@model Orchard.Fields.Fields.InputField @using Orchard.Utility.Extensions; @using Orchard.Fields.Settings; @{ var settings = Model.PartFieldDefinition.Settings.GetModel(); }
title="@settings.Title"} value="@Model.Value"@if(settings.Required) { required="required" }@if(settings.AutoFocus) { autofocus="autofocus" }@if(settings.AutoComplete) { autocomplete="on" }@if(!string.IsNullOrWhiteSpace(settings.Placeholder)) { placeholder="@settings.Placeholder"}@if(!string.IsNullOrEmpty(settings.Pattern)) { pattern="@settings.Pattern"}@if(!string.IsNullOrEmpty(settings.EditorCssClass)) { class="@settings.EditorCssClass"} else { class="text medium"} @if(settings.MaxLength > 1) { maxlength="@settings.MaxLength.ToString()"} /> @Html.ValidationMessageFor(m => m.Value) @if (HasText(settings.Hint)) { @settings.Hint } @if (!String.IsNullOrWhiteSpace(settings.DefaultValue)) { @T("If the field is left empty then the default value will be used.") }