From 52fa3a416a7b7f5b392e4c9b19faab5cd696d18a Mon Sep 17 00:00:00 2001 From: Daniel Clarke Date: Wed, 3 Jul 2024 13:41:20 +0100 Subject: [PATCH] formatting changes to question pages - brings them more in line with prototype designs --- .../Views/Questions/Date.cshtml | 25 +++++----- .../Views/Questions/Dropdown.cshtml | 46 +++++++++---------- .../Views/Questions/Radio.cshtml | 24 +++++----- 3 files changed, 46 insertions(+), 49 deletions(-) diff --git a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Date.cshtml b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Date.cshtml index 5bd380cb..115be1e2 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Date.cshtml +++ b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Date.cshtml @@ -10,10 +10,10 @@
-
@using (Html.BeginForm(Model.ActionName, Model.ControllerName, FormMethod.Post)) - { -
+ { +
+

@Model.Question @@ -22,33 +22,34 @@
@Model.QuestionHint
@if (Model.HasErrors) - { -

+ { +

Error: @Model.ErrorMessage -

- } +

+ }
- @Html.TextBoxFor(x => x.SelectedMonth, "{0:#.#}", new { id = "date-started-month", @class = "govuk-input govuk-date-input__input govuk-input--width-2", maxlength = "2", name="date-started-month", type="text", inputmode="numeric", Value = ""}) + @Html.TextBoxFor(x => x.SelectedMonth, "{0:#.#}", new { id = "date-started-month", @class = Model.HasErrors ? "govuk-input govuk-date-input__input govuk-input--width-2 govuk-input--error" : "govuk-input govuk-date-input__input govuk-input--width-2", maxlength = "2", name = "date-started-month", type = "text", inputmode = "numeric", Value = "" })
- @Html.TextBoxFor(x => x.SelectedYear, "{0:#.#}", new { id = "date-started-year", @class = "govuk-input govuk-date-input__input govuk-input--width-4", maxlength = "4", name="date-started-month", type="text", inputmode="numeric", Value = ""}) + @Html.TextBoxFor(x => x.SelectedYear, "{0:#.#}", new { id = "date-started-year", @class = Model.HasErrors ? "govuk-input govuk-date-input__input govuk-input--width-4 govuk-input--error" : "govuk-input govuk-date-input__input govuk-input--width-4", maxlength = "4", name = "date-started-month", type = "text", inputmode = "numeric", Value = "" })
-

+
+
- } -
+ + }
\ No newline at end of file diff --git a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Dropdown.cshtml b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Dropdown.cshtml index 62baaf4d..d3677508 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Dropdown.cshtml +++ b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Dropdown.cshtml @@ -21,36 +21,31 @@
-
@using (Html.BeginForm(Model.ActionName, Model.ControllerName, FormMethod.Post)) - { -
- -

- @Model.Question -

-
+ { +
+
+

+ @Model.Question +

+ +

+ @Html.Label(Model.DropdownId, Model.DropdownHeading, new { @class = "govuk-label govuk-fieldset__legend--m" }) +

@if (Model.HasErrors) { - + } + +
+ @Html.DropDownListFor(x => x.SelectedValue, Model.Values, new { @class = Model.HasErrors ? "govuk-select govuk-select--error" : "govuk-select", id = Model.DropdownId }) +
-
- -

- @Html.Label(Model.DropdownId, Model.DropdownHeading, new { @class = "govuk-label govuk-fieldset__legend--m" }) -

- -
- @Html.DropDownListFor(x => x.SelectedValue, Model.Values, new { @class = Model.HasErrors ? "govuk-select govuk-select--error" : "govuk-select", id = Model.DropdownId }) -
- -
- @Html.CheckBoxFor(x => x.NotInTheList, new { @class = "govuk-checkboxes__input", id=Model.CheckboxId, name="awarding-organisation" }) + @Html.CheckBoxFor(x => x.NotInTheList, new { @class = "govuk-checkboxes__input", id = Model.CheckboxId, name = "awarding-organisation" }) @Html.Label(Model.CheckboxId, Model.NotInListText, new { @class = "govuk-label govuk-checkboxes__label" })
@@ -60,7 +55,8 @@ @Model.CtaButtonText
- } -
+ + } +
\ No newline at end of file diff --git a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Radio.cshtml b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Radio.cshtml index 2376b5e2..095a7d60 100644 --- a/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Radio.cshtml +++ b/src/Dfe.EarlyYearsQualification.Web/Views/Questions/Radio.cshtml @@ -10,15 +10,14 @@
-
- @using (Html.BeginForm(Model.ActionName, Model.ControllerName, FormMethod.Post)) - { -
- -

- @Model.Question -

-
+ @using (Html.BeginForm(Model.ActionName, Model.ControllerName, FormMethod.Post)) + { +
+
+

+ @Model.Question +

+ @if (!string.IsNullOrEmpty(Model.AdditionalInformationHeader) && !string.IsNullOrEmpty(Model.AdditionalInformationBody)) {
@@ -49,13 +48,14 @@
}
- +
+
- } -
+ + } \ No newline at end of file