|
21 | 21 | } |
22 | 22 | <h1 class="nhsuk-heading-xl">Search for your country</h1> |
23 | 23 | <form asp-controller="Account" asp-action="CreateAccountCountrySelection" method="get"> |
24 | | - <input type="hidden" name="formSubmission" value="true"> |
| 24 | + <input type="hidden" name="formSubmission" value="true"> |
| 25 | + <div class="@(errorHasOccurred ? "nhsuk-form-group input-validation-error" : "nhsuk-form-group")"> |
25 | 26 | <label for="FilterText" class="nhsuk-body-l nhsuk-u-font-size-19 nhsuk-u-margin-bottom-3">Search for example, England</label> |
26 | | - <div class="nhsuk-form-group search-box-container" style="white-space:nowrap"> |
| 27 | + @if (errorHasOccurred) |
| 28 | + { |
| 29 | + <span class="nhsuk-error-message"> |
| 30 | + <span class="nhsuk-u-visually-hidden">Error:</span> @CommonValidationErrorMessages.SearchTermRequired |
| 31 | + </span> |
| 32 | + } |
| 33 | + <div class="nhsuk-form-group search-box-container" style="white-space:nowrap"> |
27 | 34 | <input class="nhsuk-input nhsuk-search__input" type="search" autocomplete="off" id="FilterText" name="FilterText" placeholder="" value="@Model.FilterText" @if (errorHasOccurred) |
28 | 35 | { |
29 | 36 | <text>aria-describedby="error-summary-title custom-validation-error"</text> |
30 | 37 | }> |
31 | | - <button class="nhsuk-search__submit" type="submit"> |
32 | | - <svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> |
33 | | - <path d="M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z"></path> |
34 | | - </svg> |
35 | | - <span class="nhsuk-u-visually-hidden">Search</span> |
36 | | - </button> |
37 | | - </div> |
38 | | - <div> |
39 | | - @if (errorHasOccurred) |
40 | | - { |
41 | | - <span id="custom-validation-error" class="custom-validation-error">@CommonValidationErrorMessages.SearchTermRequired</span> |
42 | | - } |
| 38 | + <button class="nhsuk-search__submit" type="submit"> |
| 39 | + <svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> |
| 40 | + <path d="M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z"></path> |
| 41 | + </svg> |
| 42 | + <span class="nhsuk-u-visually-hidden">Search</span> |
| 43 | + </button> |
| 44 | + </div> |
43 | 45 | </div> |
44 | 46 | </form> |
45 | 47 |
|
|
0 commit comments