52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
@using LeafWeb.Web.Utility
|
|
@model object
|
|
@{
|
|
Layout = null;
|
|
var lowerPropertyName = @LeafWeb.Core.Utility.StringExtensions.LowercaseFirst(ViewData.ModelMetadata.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;
|
|
}
|
|
<div class="form-group @lowerPropertyName">
|
|
@Html.LabelForModel(new { @class = "control-label" })
|
|
<div class="controls">
|
|
@RenderBody()
|
|
@Html.ValidationMessage("", new { @class = "help-block"})
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@*<div class="form-group @lowerPropertyName">
|
|
@if (editLabel)
|
|
{
|
|
@Html.LabelForModel()
|
|
}
|
|
<div class="input-group">
|
|
@if (!string.IsNullOrEmpty(units))
|
|
{
|
|
<div class="input-append">
|
|
@RenderBody()
|
|
<span class="add-on">@units</span>
|
|
</div>
|
|
}
|
|
else if (!string.IsNullOrEmpty(currency))
|
|
{
|
|
<div class="input-prepend">
|
|
<span class="add-on">@currency</span>
|
|
@RenderBody()
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
@RenderBody()
|
|
}
|
|
@if (!string.IsNullOrEmpty(formatHint))
|
|
{
|
|
<div><small><em>@formatHint</em></small></div>
|
|
}
|
|
<span class="help-block">@Html.ValidationMessage("")</span>
|
|
</div>
|
|
</div>*@
|