Skip to content

Commit 040ef8d

Browse files
committed
TD-5301: Select Your Grade Page (Registration Process) - Error message is not clear
1 parent 628d47d commit 040ef8d

19 files changed

+292
-278
lines changed

LearningHub.Nhs.WebUI/Helpers/CommonValidationErrorMessages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static class CommonValidationErrorMessages
5858
/// <summary>
5959
/// Grade Required.
6060
/// </summary>
61-
public const string GradeRequired = "Select a grade";
61+
public const string GradeRequired = "Select a pay band. You can find this information from your paper payslip or online via ESR";
6262

6363
/// <summary>
6464
/// Primary specialty Not Applicable.

LearningHub.Nhs.WebUI/Views/Account/ChangePassword.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model LearningHub.Nhs.WebUI.Models.Account.PasswordValidateViewModel
22

33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "Account - Change password";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}

LearningHub.Nhs.WebUI/Views/Account/CreateAccountGradeSelection.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
populate-with-current-values="true"
4242
radios="@Model.GradeRadio()"
4343
hint-text="You can find this on your payslip."
44-
required-client-side-error-message="Select a grade"
44+
required-client-side-error-message="Select a pay band. You can find this information from your paper payslip or online via ESR"
4545
required="true"
4646
is-page-heading="true" />
4747

LearningHub.Nhs.WebUI/Views/Account/ForgotUserPassword.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@model ForgotPasswordViewModel;
66

77
@{
8+
ViewData["DisableValidation"] = true;
89
ViewData["Title"] = "ForgotPassword";
910
var errorHasOccurred = !ViewData.ModelState.IsValid;
1011
}

LearningHub.Nhs.WebUI/Views/MyAccount/ChangeCountry.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@using LearningHub.Nhs.WebUI.Models.UserProfile
22
@model Tuple<UserProfileSummaryViewModel, UserLocationViewModel>
33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "My Account - Change country";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}
Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,97 @@
11
@model LearningHub.Nhs.WebUI.Models.UserProfile.UserJobRoleUpdateViewModel
22

33
@{
4-
ViewData["Title"] = "Update Current Role";
5-
var errorHasOccurred = !ViewData.ModelState.IsValid;
4+
ViewData["DisableValidation"] = true;
5+
ViewData["Title"] = "Update Current Role";
6+
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}
78

89
<div class="create-account">
9-
<div class="nhsuk-width-container app-width-container">
10-
<div class="nhsuk-grid-row">
11-
<div class="nhsuk-grid-column-two-thirds nhsuk-u-padding-bottom-9">
12-
<vc:back-link asp-controller="MyAccount" asp-action="Index" link-text="Go back" />
13-
14-
@if (errorHasOccurred)
15-
{
16-
<vc:error-summary order-of-property-names="@(new[] { nameof(Model) })" />
17-
}
18-
19-
<h1 class="nhsuk-heading-xl">Update current job role</h1>
20-
21-
<div>
22-
<div class="nhsuk-form-group">
23-
<div class="nhsuk-label nhsuk-u-font-weight-bold">Current selected role</div>
24-
<div class="nhsuk-hint">@Model.CurrentRoleName</div>
25-
</div>
26-
27-
<div class="nhsuk-u-padding-bottom-5">
28-
<hr class="nhsuk-section-break nhsuk-section-break--visible ">
29-
</div>
30-
</div>
31-
32-
@if (!string.IsNullOrWhiteSpace(@Model.FilterText))
33-
{
34-
<h2 class="nhsuk-heading-l">Search results for @Model.FilterText</h2>
35-
}
36-
else
37-
{
38-
<h2 class="nhsuk-heading-l">Search for your current role</h2>
39-
}
40-
41-
<form>
42-
<input type="hidden" name="searchSubmission" value="true">
43-
44-
<label for="FilterText" class="nhsuk-body-l nhsuk-u-font-size-19 nhsuk-u-margin-bottom-3">
45-
Search a generic term to best describe your role
46-
</label>
47-
48-
<div class="nhsuk-form-group search-box-container" style="white-space:nowrap">
49-
<input class="nhsuk-input nhsuk-search__input" type="search" autocomplete="off" id="FilterText" name="FilterText" placeholder="" value="@Model.FilterText">
50-
<button class="nhsuk-search__submit" type="submit">
51-
<svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
52-
<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>
53-
</svg>
54-
<span class="nhsuk-u-visually-hidden">Search</span>
55-
</button>
56-
57-
</div>
58-
</form>
59-
60-
@if (!string.IsNullOrWhiteSpace(@Model.FilterText))
61-
{
62-
if (Model.RoleList.Any())
63-
{
64-
<form>
65-
<vc:radio-list asp-for="SelectedJobRoleId"
66-
label="Select your new role"
67-
populate-with-current-values="true"
68-
radios="@Model.RoleRadio().ToList()"
69-
hint-text=""
70-
required-client-side-error-message="Error: Select a role"
71-
required="true" />
72-
73-
<div class="nhsuk-form-group">
74-
<input type="hidden" name="formSubmission" value="true">
75-
<input type="hidden" name="filterText" value="@Context.Request.Query["filterText"]">
76-
<button type="submit" class="nhsuk-button">Continue</button>
77-
</div>
78-
79-
</form>
80-
81-
@await Html.PartialAsync("_UserJobRolePaging", Model)
82-
}
83-
else
84-
{
85-
<h2 class="nhsuk-heading-l">No results found for @Model.FilterText</h2>
86-
<p>You could try:</p>
87-
<ul class="nhsuk-list nhsuk-list--bullet nhsuk-u-padding-bottom-3">
88-
<li>checking your spelling</li>
89-
<li>searching again using other words</li>
90-
</ul>
91-
}
92-
}
93-
94-
</div>
10+
<div class="nhsuk-width-container app-width-container">
11+
<div class="nhsuk-grid-row">
12+
<div class="nhsuk-grid-column-two-thirds nhsuk-u-padding-bottom-9">
13+
<vc:back-link asp-controller="MyAccount" asp-action="Index" link-text="Go back" />
14+
15+
@if (errorHasOccurred)
16+
{
17+
<vc:error-summary order-of-property-names="@(new[] { nameof(Model) })" />
18+
}
19+
20+
<h1 class="nhsuk-heading-xl">Update current job role</h1>
21+
22+
<div>
23+
<div class="nhsuk-form-group">
24+
<div class="nhsuk-label nhsuk-u-font-weight-bold">Current selected role</div>
25+
<div class="nhsuk-hint">@Model.CurrentRoleName</div>
26+
</div>
27+
28+
<div class="nhsuk-u-padding-bottom-5">
29+
<hr class="nhsuk-section-break nhsuk-section-break--visible ">
30+
</div>
9531
</div>
32+
33+
@if (!string.IsNullOrWhiteSpace(@Model.FilterText))
34+
{
35+
<h2 class="nhsuk-heading-l">Search results for @Model.FilterText</h2>
36+
}
37+
else
38+
{
39+
<h2 class="nhsuk-heading-l">Search for your current role</h2>
40+
}
41+
42+
<form>
43+
<input type="hidden" name="searchSubmission" value="true">
44+
45+
<label for="FilterText" class="nhsuk-body-l nhsuk-u-font-size-19 nhsuk-u-margin-bottom-3">
46+
Search a generic term to best describe your role
47+
</label>
48+
49+
<div class="nhsuk-form-group search-box-container" style="white-space:nowrap">
50+
<input class="nhsuk-input nhsuk-search__input" type="search" autocomplete="off" id="FilterText" name="FilterText" placeholder="" value="@Model.FilterText">
51+
<button class="nhsuk-search__submit__green" type="submit">
52+
<svg class="nhsuk-icon nhsuk-icon__search__green" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
53+
<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>
54+
</svg>
55+
<span class="nhsuk-u-visually-hidden">Search</span>
56+
</button>
57+
</div>
58+
</form>
59+
60+
@if (!string.IsNullOrWhiteSpace(@Model.FilterText))
61+
{
62+
if (Model.RoleList.Any())
63+
{
64+
<form>
65+
<vc:radio-list asp-for="SelectedJobRoleId"
66+
label="Select your new role"
67+
populate-with-current-values="true"
68+
radios="@Model.RoleRadio().ToList()"
69+
hint-text=""
70+
required-client-side-error-message="Error: Select a role"
71+
required="true" />
72+
73+
<div class="nhsuk-form-group">
74+
<input type="hidden" name="formSubmission" value="true">
75+
<input type="hidden" name="filterText" value="@Context.Request.Query["filterText"]">
76+
<button type="submit" class="nhsuk-button">Continue</button>
77+
</div>
78+
79+
</form>
80+
81+
@await Html.PartialAsync("_UserJobRolePaging", Model)
82+
}
83+
else
84+
{
85+
<h2 class="nhsuk-heading-l">No results found for @Model.FilterText</h2>
86+
<p>You could try:</p>
87+
<ul class="nhsuk-list nhsuk-list--bullet nhsuk-u-padding-bottom-3">
88+
<li>checking your spelling</li>
89+
<li>searching again using other words</li>
90+
</ul>
91+
}
92+
}
93+
94+
</div>
9695
</div>
96+
</div>
9797
</div>

LearningHub.Nhs.WebUI/Views/MyAccount/ChangeFirstname.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model LearningHub.Nhs.WebUI.Models.UserProfile.UserPersonalDetailsViewModel
22

33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "My Account - Change first name";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}

LearningHub.Nhs.WebUI/Views/MyAccount/ChangeGrade.cshtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model LearningHub.Nhs.WebUI.Models.UserProfile.UserGradeUpdateViewModel
22

33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "Update Job Grade";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}
@@ -57,7 +58,7 @@
5758
populate-with-current-values="true"
5859
radios="@Model.GradeRadio().ToList()"
5960
hint-text="You can find this on your payslip."
60-
required-client-side-error-message="Select a grade"
61+
required-client-side-error-message="Select a pay band. You can find this information from your paper payslip or online via ESR"
6162
required="true" />
6263

6364
<div class="nhsuk-form-group">

LearningHub.Nhs.WebUI/Views/MyAccount/ChangeLastName.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model LearningHub.Nhs.WebUI.Models.UserProfile.UserPersonalDetailsViewModel
22

33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "My Account - Change last name";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}

LearningHub.Nhs.WebUI/Views/MyAccount/ChangeMedicalCouncilNumber.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@model LearningHub.Nhs.WebUI.Models.UserProfile.UserMedicalCouncilNoUpdateViewModel
22

33
@{
4+
ViewData["DisableValidation"] = true;
45
ViewData["Title"] = "Update Medical Council Number";
56
var errorHasOccurred = !ViewData.ModelState.IsValid;
67
}

0 commit comments

Comments
 (0)