Skip to content

Commit 831f1fc

Browse files
Feature/bug 502 (#274)
* updated code to hide Dashboard and Notification nav link until user has organisation registered, able to register organisation for user now * Switched controller for contactDetails from UserDetails to Organisation
1 parent fe8c9c4 commit 831f1fc

File tree

4 files changed

+271
-19
lines changed

4 files changed

+271
-19
lines changed

HNTAS/HNTAS.Web.UI/Controllers/OrganisationController.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,10 @@ public IActionResult ContactDetails()
393393
var orgModel = _sessionHelper.GetFromSession<OrganisationModel>(HttpContext, SessionKeys.OrganisationCreation_SessionKey);
394394
var userModel = _sessionHelper.GetFromSession<UserModel>(HttpContext, SessionKeys.UserCreation_SessionKey);
395395
this.ShowBackButton("DeedPoll");
396-
ViewBag.NextActionController = "UserDetails";
397-
return View("UserDetails/ContactDetails", userModel.ContactDetails);
396+
return View(userModel.ContactDetails);
398397
}
399398

399+
// not in use
400400
[HttpPost]
401401
[ValidateAntiForgeryToken]
402402
[ServiceFilter(typeof(EnsureSessionForOrganisationFlowOnPostAttribute))]
@@ -460,9 +460,7 @@ public IActionResult CheckYourAnswers()
460460
Organisation = organisationModel,
461461
User = userModel,
462462
ConfirmDeclaration = false
463-
};
464-
465-
//ViewBag.ShowBackButton = false;
463+
};
466464

467465
// Set the flow state to Check Answers mode
468466
_sessionHelper.SetIsCheckAnswerFlow(HttpContext, true);

HNTAS/HNTAS.Web.UI/Models/CheckYourAnswersModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public class CheckYourAnswersModel
1717
// The ConfirmedDeclaration property, now part of this specific ViewModel
1818
[Display(Name = "I confirm that")]
1919
[Range(typeof(bool), "true", "true", ErrorMessage = "You must confirm the declaration to proceed.")]
20-
public bool ConfirmDeclaration { get; set; }
20+
public bool ConfirmDeclaration { get; set; } = true;
2121
}
2222
}

HNTAS/HNTAS.Web.UI/Views/Organisation/CheckYourAnswers.cshtml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
}
3737

3838
<div class="govuk-width-container">
39-
<main class="govuk-main-wrapper" id="main-content" role="main">
39+
<div class="govuk-grid-row">
40+
<div class="govuk-grid-column-two-thirds">
4041
<h1 class="govuk-heading-l">Check your answers before submitting</h1>
4142

4243
<form asp-controller="Organisation" asp-action="SubmitAnswers" method="post" novalidate>
@@ -93,13 +94,13 @@
9394
<dd class="govuk-summary-list__actions">
9495
@if (!string.IsNullOrEmpty(organisationModel.CompanyNumber))
9596
{
96-
<a class="govuk-link" href="@Url.Action("CompanyNumber")">Change<span class="govuk-visually-hidden"> company number</span></a>
97+
<a class="govuk-link" href="@Url.Action("CompanyNumber")">Change<span class="govuk-visually-hidden"> company number</span></a>
9798
}
9899
else
99100
{
100-
<a class="govuk-link" href="@Url.Action("OrganisationAddress")">Change<span class="govuk-visually-hidden"> company number</span></a>
101+
<a class="govuk-link" href="@Url.Action("OrganisationAddress")">Change<span class="govuk-visually-hidden"> company number</span></a>
101102
}
102-
</dd>
103+
</dd>
103104
</div>
104105
</dl>
105106

@@ -144,8 +145,8 @@
144145
</div>
145146
</dl>
146147

147-
<h2 class="govuk-heading-m">Declaration</h2>
148-
<div class="govuk-form-group @(hasDeclarationErrors ? "govuk-form-group--error" : "")">
148+
@* <h2 class="govuk-heading-m">Declaration</h2> *@
149+
@* <div class="govuk-form-group @(hasDeclarationErrors ? "govuk-form-group--error" : "")">
149150
<fieldset class="govuk-fieldset" aria-describedby="@(hasDeclarationErrors ? "confirmDeclaration-error" : "")">
150151
<legend class="govuk-fieldset__legend govuk-fieldset__legend--s">
151152
<h1 class="govuk-fieldset__heading">Tick to confirm:</h1>
@@ -160,10 +161,10 @@
160161
<div class="govuk-checkboxes govuk-checkboxes--small" data-module="govuk-checkboxes">
161162
<div class="govuk-checkboxes__item">
162163
<input class="govuk-checkboxes__input"
163-
id="@fieldName"
164-
asp-for="ConfirmDeclaration"
165-
type="checkbox"
166-
value="true">
164+
id="@fieldName"
165+
asp-for="ConfirmDeclaration"
166+
type="checkbox"
167+
value="true">
167168
<label class="govuk-label govuk-checkboxes__label" for="@fieldName">
168169
I confirm that:
169170
</label>
@@ -174,11 +175,12 @@
174175
175176
<ul class="govuk-list govuk-list--bullet">
176177
<li>I have read and understood the digital form and guidance currently published on <a href="#" class="govuk-link">GOV.UK</a></li>
177-
</ul>
178+
</ul> *@
178179

179180
<button type="submit" class="govuk-button" data-module="govuk-button">
180-
Accept and send
181+
Submit
181182
</button>
182183
</form>
183-
</main>
184+
</div>
185+
</div>
184186
</div>

0 commit comments

Comments
 (0)