@using StringExtensions = LeafWeb.Core.Utility.StringExtensions @model object @{ Layout = null; var lowerPropertyName = StringExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName); var groupClass = $"form-group {lowerPropertyName}"; if (ViewBag.groupClass != null) { groupClass = string.Concat(groupClass, " ", ViewBag.groupClass); } var labelText = string.Empty; if (ViewBag.labelText != null) { labelText = ViewBag.labelText; } }
@if (!string.IsNullOrEmpty(labelText)) { @Html.LabelForModel(labelText) } else { @Html.LabelForModel() } @RenderBody() @Html.ValidationMessage(string.Empty, new { @class = "text-danger" })