mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Preventing hints from being rendered if they are empty
--HG-- branch : 1.x
This commit is contained in:
@@ -9,5 +9,7 @@
|
||||
else {
|
||||
@Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor)
|
||||
}
|
||||
@if (HasText(Model.Settings.Hint)) {
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
@@ -40,5 +40,7 @@
|
||||
break;
|
||||
}
|
||||
@Html.ValidationMessageFor(m => m.Value)
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
@@ -24,7 +24,9 @@
|
||||
}
|
||||
@if(Model.ShowDate) { <text>@Html.ValidationMessageFor(m=>m.Date)</text> } @if(Model.ShowTime) { <text>@Html.ValidationMessageFor(m=>m.Time)</text> }
|
||||
|
||||
@if (HasText(Model.Hint)) {
|
||||
<span class="hint">@Model.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
||||
@using(Script.Foot()) {
|
||||
|
@@ -43,5 +43,7 @@
|
||||
}
|
||||
|
||||
@Html.ValidationMessageFor(m => m.SelectedValues)
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
@@ -8,5 +8,7 @@
|
||||
<label for="@Html.FieldIdFor(m => m.Value)" @if(settings.Required) { <text>class="required"</text> }>@Model.DisplayName</label>
|
||||
<input type="@settings.Type.ToString().ToLower()" id="@Html.FieldIdFor(m => m.Value)" name="@Html.FieldNameFor(m => m.Value)"@if(!String.IsNullOrWhiteSpace(settings.Title)) {<text> title="@settings.Title"</text>} value="@Model.Value"@if(settings.Required) {<text> required="required"</text> }@if(settings.AutoFocus) {<text> autofocus="autofocus"</text> }@if(settings.AutoComplete) {<text> autocomplete="on"</text> }@if(!string.IsNullOrWhiteSpace(settings.Placeholder)) {<text> placeholder="@settings.Placeholder"</text>}@if(!string.IsNullOrEmpty(settings.Pattern)) {<text> pattern="@settings.Pattern"</text>}@if(!string.IsNullOrEmpty(settings.EditorCssClass)) {<text> class="@settings.EditorCssClass"</text>} else {<text> class="textMedium"</text>} @if(settings.MaxLength > 1) {<text> maxlength="@settings.MaxLength.ToString()"</text>} />
|
||||
@Html.ValidationMessageFor(m => m.Value)
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
@@ -17,8 +17,9 @@
|
||||
}
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Value)">@Model.DisplayName</label>
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
|
||||
}
|
||||
<div class="editor-label">
|
||||
<label for="@Html.FieldIdFor(m => m.Value)" @if(settings.Required) { <text>class="required"</text> }>@T("Url")</label>
|
||||
</div>
|
||||
|
@@ -14,7 +14,9 @@
|
||||
|
||||
<fieldset>
|
||||
<label @if(settings.Required) { <text>class="required"</text> }>@Model.Field.DisplayName</label>
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
}
|
||||
|
||||
<div id="save-message-@descriminator" class="message message-Warning media-gallery-message">@T("You need to save your changes.")</div>
|
||||
<table id="media-gallery-@descriminator" class="items media-gallery" summary="@Model.Field.DisplayName">
|
||||
|
@@ -15,8 +15,9 @@
|
||||
<span id="clear-@Html.FieldIdFor(m => m.Url)" class="button">@T("Clear")</span>
|
||||
}
|
||||
|
||||
@if (HasText(settings.Hint)) {
|
||||
<span class="hint">@settings.Hint</span>
|
||||
|
||||
}
|
||||
@Html.HiddenFor(m => m.AlternateText)
|
||||
@Html.HiddenFor(m => m.Class)
|
||||
@Html.HiddenFor(m => m.Style)
|
||||
|
@@ -6,5 +6,7 @@
|
||||
<label for="@Html.FieldIdFor(m => m.Value)" @if(Model.Settings.Required) { <text>class="required"</text> }>@Model.Field.DisplayName</label>
|
||||
@Html.TextBoxFor(m => m.Value, new { @class = "text-small", type = "text", min = (Model.Settings.Minimum.HasValue) ? Model.Settings.Minimum.Value : 0, max = (Model.Settings.Maximum.HasValue) ? Model.Settings.Maximum.Value : 1000000, step = Math.Pow(10, 0 - Model.Settings.Scale).ToString(CultureInfo.InvariantCulture) })
|
||||
@Html.ValidationMessageFor(m => m.Value)
|
||||
@if (HasText(Model.Settings.Hint)) {
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
|
Reference in New Issue
Block a user