Add Photosynthesis Type
This commit is contained in:
@@ -2,14 +2,17 @@
|
||||
@model object
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = @LeafWeb.Core.Utility.StringExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
var propertyName = ViewData.ModelMetadata.PropertyName;
|
||||
var lowerPropertyName = @LeafWeb.Core.Utility.StringExtensions.LowercaseFirst(propertyName);
|
||||
var values = ViewData.ModelMetadata.AdditionalValues;
|
||||
var units = values.ContainsKey("Units") ? (string)values["Units"] : null;
|
||||
var currency = values.ContainsKey("Currency") ? (string)values["Currency"] : null;
|
||||
var formatHint = values.ContainsKey("FormatHint") ? (string)values["FormatHint"] : null;
|
||||
var editLabel = values.ContainsKey("EditLabel") ? (bool)values["EditLabel"] : true;
|
||||
var hasError = ViewData.ModelState[propertyName] != null && ViewData.ModelState[propertyName].Errors.Any();
|
||||
var hasErrorClass = hasError ? "has-error" : string.Empty;
|
||||
}
|
||||
<div class="form-group @lowerPropertyName">
|
||||
<div class="form-group @lowerPropertyName @hasErrorClass">
|
||||
@Html.LabelForModel(new { @class = "control-label" })
|
||||
@RenderBody()
|
||||
@Html.ValidationMessage("", new { @class = "help-block"})
|
||||
|
||||
Reference in New Issue
Block a user