File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
NHSUKViewComponents.Web/Views/Shared/Components Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 25
25
26
26
@if (Model .HintTextLines != null ) {
27
27
@foreach (var hintText in Model .HintTextLines ) {
28
- < div class = " nhsuk-hint" >
28
+ < div class = " nhsuk-hint" id = " @Model.Id-hint " >
29
29
@hintText
30
30
< / div >
31
31
}
Original file line number Diff line number Diff line change 11
11
< ul class = " nhsuk-list nhsuk-error-summary__list" >
12
12
@foreach (var item in Model .Errors .OrderBy (x => x .Key ))
13
13
{
14
- < li >
15
- < a href = " #@item.Key" > @item .ErrorMessage < / a >
16
- < / li >
14
+ if (! string .IsNullOrWhiteSpace (item .ErrorMessage ))
15
+ {
16
+ < li >
17
+ < a href = " #@item.Key" > @item .ErrorMessage < / a >
18
+ < / li >
19
+ }
17
20
}
18
21
< / ul >
19
22
< / div >
Original file line number Diff line number Diff line change 9
9
10
10
<div class =" nhsuk-form-group @(Model.HasError ? " nhsuk-form-group--error " : " " )" >
11
11
12
- <fieldset class =" nhsuk-fieldset" aria-describedby =" @Model.Label.RemoveWhitespace()-hint" >
12
+ <fieldset class =" nhsuk-fieldset" aria-describedby =" @(!string.IsNullOrEmpty( Model.HintText) ? $ " {Model. Label.RemoveWhitespace()} -hint" : string.Empty) " >
13
13
<legend class =" nhsuk-fieldset__legend nhsuk-fieldset__legend--m" >
14
14
@if (Model .IsPageHeading .GetValueOrDefault () == true )
15
15
{
You can’t perform that action at this time.
0 commit comments