|
|
|
@ -15,18 +15,18 @@
|
|
|
|
|
{
|
|
|
|
|
var uihit = prop.TemplateHint ?? prop.DataTypeName;
|
|
|
|
|
var isRequired = prop.IsRequired && prop.ModelType != typeof(bool);
|
|
|
|
|
var htmlClass = "col-sm-2 control-label";
|
|
|
|
|
var htmlClass = "col-sm-2 col-form-label";
|
|
|
|
|
htmlClass += isRequired ? " required" : "";
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
@if (prop.ModelType == typeof(bool))
|
|
|
|
|
<div class="form-group row">
|
|
|
|
|
@if (prop.ModelType != typeof(bool))
|
|
|
|
|
{
|
|
|
|
|
<div class="col-sm-2"></div>
|
|
|
|
|
@Html.Label(prop.PropertyName, prop.GetDisplayName() + ":", new { @class = htmlClass })
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@Html.Label(prop.PropertyName, prop.GetDisplayName() + ":", new { @class = htmlClass })
|
|
|
|
|
<div class="col-sm-2"></div>
|
|
|
|
|
}
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
@if (metadata.Attributes.Attributes.Any(o => o.GetType() == typeof(System.ComponentModel.ReadOnlyAttribute)))
|
|
|
|
|
{
|
|
|
|
|
<div class="form-control form-control-display">
|
|
|
|
@ -57,8 +57,9 @@
|
|
|
|
|
}
|
|
|
|
|
else if (prop.ModelType == typeof(bool))
|
|
|
|
|
{
|
|
|
|
|
<div class="checkboxfix">
|
|
|
|
|
@Html.CheckBox(prop.PropertyName) <span>@prop.GetDisplayName()</span>
|
|
|
|
|
<div class="col-sm-10 form-check">
|
|
|
|
|
@Html.CheckBox(prop.PropertyName, new { @class = "form-check-input" })
|
|
|
|
|
@Html.Label(prop.PropertyName, prop.GetDisplayName() + ":", new { @class = "form-check-label" })
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|