Skip to content

Commit a87f8fb

Browse files
committed
TD-4199: DIG1801: There are some problems with the consistency and operation of components
1 parent dd68261 commit a87f8fb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

LearningHub.Nhs.WebUI/Controllers/AccountController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,15 +648,16 @@ public async Task<IActionResult> CreateAccountCurrentRole(AccountCreationViewMod
648648
public async Task<IActionResult> CreateAccountProfessionalRegNumber(AccountCreationViewModel accountCreationViewModel)
649649
{
650650
var roleCheck = int.TryParse(accountCreationViewModel.CurrentRole, out int roleId);
651+
var accountCreation = await this.multiPageFormService.GetMultiPageFormData<AccountCreationViewModel>(MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData);
652+
651653
if (string.IsNullOrWhiteSpace(accountCreationViewModel.CurrentRole) || !roleCheck)
652654
{
653655
this.ModelState.AddModelError("CurrentRole", CommonValidationErrorMessages.RoleRequired);
654656
var jobroles = await this.jobRoleService.GetPagedFilteredAsync(accountCreationViewModel.FilterText, 1, UserRegistrationContentPageSize);
655-
return this.View("CreateAccountCurrentRole", new AccountCreationListViewModel { FilterText = accountCreationViewModel.FilterText, RoleList = jobroles.Item2, AccountCreationPaging = new AccountCreationPagingModel { TotalItems = jobroles.Item1, PageSize = UserRegistrationContentPageSize, HasItems = jobroles.Item1 > 0, CurrentPage = 1 }, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation });
657+
return this.View("CreateAccountCurrentRole", new AccountCreationListViewModel { FilterText = accountCreationViewModel.FilterText, CountryId = accountCreation.CountryId, RoleList = jobroles.Item2, AccountCreationPaging = new AccountCreationPagingModel { TotalItems = jobroles.Item1, PageSize = UserRegistrationContentPageSize, HasItems = jobroles.Item1 > 0, CurrentPage = 1 }, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation });
656658
}
657659

658660
var jobrole = await this.jobRoleService.GetByIdAsync(roleId);
659-
var accountCreation = await this.multiPageFormService.GetMultiPageFormData<AccountCreationViewModel>(MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData);
660661
accountCreation.CurrentRole = jobrole.Id.ToString();
661662
accountCreation.CurrentRoleName = jobrole.Name;
662663
accountCreation.MedicalCouncilId = jobrole.MedicalCouncilId;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div class="nhsuk-grid-column-two-thirds @(returnToConfirmation ? "nhsuk-u-padding-top-7":string.Empty) nhsuk-u-padding-bottom-9">
2323
@if (!returnToConfirmation)
2424
{
25-
if (Model.CountryId == "1" || errorHasOccurred)
25+
if (Model.CountryId == "1") //|| errorHasOccurred
2626
{
2727
<vc:back-link asp-controller="Account" asp-action="CreateAccountRegionSelection" asp-all-route-data="@routeData" link-text="Back to: Select your region" />
2828

0 commit comments

Comments
 (0)