mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#18464: Adding "required" class to fields' labels
Work Item: 18464 --HG-- branch : 1.x
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldDriverViewModel
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Text)">@Model.Field.DisplayName</label>
|
||||
<label for="@Html.FieldIdFor(m => m.Text)" @if(Model.Settings.Required) { <text>class="required"</text> }>@Model.Field.DisplayName</label>
|
||||
@if (String.IsNullOrWhiteSpace(Model.Settings.Flavor)) {
|
||||
@Html.TextBoxFor(m => m.Text, new { @class = "text" })
|
||||
@Html.ValidationMessageFor(m => m.Text)
|
||||
|
||||
@@ -547,7 +547,7 @@ legend { font-size: 1.231em; font-weight: normal; border:none;}
|
||||
fieldset { padding:6px 0 0; margin:0 0 12px 0; border: 0px solid #dbdbdb; }
|
||||
label { font-weight:normal; display:block; padding: 0 0 0.3em 0; }
|
||||
label.forcheckbox { margin:0 0 0 .4em; display:inline; }
|
||||
|
||||
label.required:after {margin-left: 1ex; content: "*"; color: red; }
|
||||
|
||||
form.inline, form.inline fieldset { /* todo: (heskew) need something other than .inline ... */
|
||||
display:inline;
|
||||
|
||||
Reference in New Issue
Block a user