mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 10:34:34 +08:00
#18464: Adding "required" class to fields' labels
Work Item: 18464 --HG-- branch : 1.x
This commit is contained in:
parent
89cf448bec
commit
99be8137d0
@ -9,4 +9,4 @@ c77d9dafaa25a31b302877282a169cb9a0dd06b8 src/Orchard.Web/Modules/Orchard.Rules
|
||||
0c67b238df7d3758c30ce43b6293d85b1cc18e9a src/Orchard.Web/Modules/Orchard.Tokens
|
||||
67dfa347443abf0b9cd266250bdeb97a6a12717e src/orchard.web/Modules/Orchard.Alias
|
||||
f9253a8db99aebf8d8aa02b03829c8e512e10d6c src/orchard.web/Modules/Orchard.Projections
|
||||
aefccf4a2bc96af34bde4b9f86fd62d0523cf40f src/orchard.web/modules/Orchard.Fields
|
||||
08912e0ee2b74a54ace3b8e4e5e2620a7bfb0ac5 src/orchard.web/modules/Orchard.Fields
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user