#18464: Adding "required" class to fields' labels

Work Item: 18464

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-07-03 10:29:57 -07:00
parent 89cf448bec
commit 99be8137d0
3 changed files with 3 additions and 3 deletions
@@ -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;