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 2525
2626 @if (Model .HintTextLines != null ) {
2727 @foreach (var hintText in Model .HintTextLines ) {
28- < div class = " nhsuk-hint" >
28+ < div class = " nhsuk-hint" id = " @Model.Id-hint " >
2929 @hintText
3030 < / div >
3131 }
Original file line number Diff line number Diff line change 1111 < ul class = " nhsuk-list nhsuk-error-summary__list" >
1212 @foreach (var item in Model .Errors .OrderBy (x => x .Key ))
1313 {
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+ }
1720 }
1821 < / ul >
1922 < / div >
Original file line number Diff line number Diff line change 99
1010<div class =" nhsuk-form-group @(Model.HasError ? " nhsuk-form-group--error " : " " )" >
1111
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) " >
1313 <legend class =" nhsuk-fieldset__legend nhsuk-fieldset__legend--m" >
1414 @if (Model .IsPageHeading .GetValueOrDefault () == true )
1515 {
You can’t perform that action at this time.
0 commit comments