From d2ba1205e633a15336c99f4c89f376e710e4657f Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Tue, 24 Dec 2024 08:58:38 +0000 Subject: [PATCH 01/14] AP-5608: Update proceedings_sca interrupt Add interrupt card styling from moj design system. Update page template helper to allow class to be added to page heading. Update view to use moj interrupt --- app/assets/stylesheets/application.scss | 1 + app/helpers/page_template_helper.rb | 4 ++-- .../proceedings_sca/interrupts/show.html.erb | 24 +++++++++---------- config/locales/en/providers.yml | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index a6aaae2d8f..ffbff8a9b1 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -9,6 +9,7 @@ $govuk-assets-path: "/"; @import "@ministryofjustice/frontend/moj/components/sub-navigation/sub-navigation"; @import "@ministryofjustice/frontend/moj/components/sortable-table/sortable-table"; @import "@ministryofjustice/frontend/moj/components/primary-navigation/primary-navigation"; +@import "@ministryofjustice/frontend/moj/components/interruption-card/interruption-card"; // Project specific diff --git a/app/helpers/page_template_helper.rb b/app/helpers/page_template_helper.rb index 0e802d03e5..e41309c8fa 100644 --- a/app/helpers/page_template_helper.rb +++ b/app/helpers/page_template_helper.rb @@ -79,10 +79,10 @@ def page_template( ) end - def page_heading(heading: :h1, size: :xl, margin_bottom: nil) + def page_heading(heading: :h1, size: :xl, margin_bottom: nil, classes: nil) return unless page_title - classes = ["govuk-heading-#{size}"] + classes = ["govuk-heading-#{size} #{classes}"] classes << "govuk-!-margin-bottom-#{margin_bottom}" if margin_bottom content_tag heading, page_title, class: classes.join(" ") end diff --git a/app/views/providers/proceedings_sca/interrupts/show.html.erb b/app/views/providers/proceedings_sca/interrupts/show.html.erb index 9fe5198672..03aaa0a7d9 100644 --- a/app/views/providers/proceedings_sca/interrupts/show.html.erb +++ b/app/views/providers/proceedings_sca/interrupts/show.html.erb @@ -1,17 +1,17 @@ -
<%= t(".#{@type}.paragraph") %>
+<%= t(".#{@type}.paragraph") %>
<% end %> -<%= t(".#{@type}.options") %>
- <%= govuk_list t(".#{@type}.option_bullets_html"), type: :bullet %> -<%= t(".#{@type}.options") %>
+ <%= govuk_list t(".#{@type}.option_bullets_html"), type: :bullet, classes: "moj-interruption-card__body" %> - - <% end %> + + <% end %> +<%= body_text %>
+<%= body_text %>
<% if local_assigns[:list] %> -<%= t(".they_will_check") %>
- <% end %> +<%= t(".they_will_check") %>
+ <% end %> +<%= t(".line_1") %>
-<%= t(".line_2") %>
+<%= t(".line_1") %>
+ <%= govuk_list t(".details", + capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), + income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), + type: :bullet, + classes: "moj-interruption-card__body" %> + +<%= t(".line_2") %>
<%= detail %>
+<%= detail %>
<% end %><%= detail %>
+<%= detail %>
<% end %><%= detail %>
+<%= detail %>
<% end %><%= sanitize(t(".detail", ineligible_reasons: ineligible_reasons(@cfe_result))) %>
+<%= sanitize(t(".detail", ineligible_reasons: ineligible_reasons(@cfe_result))) %>
<%= t(".line1_eligible") %>
+<%= t(".line1_eligible") %>
<% elsif @details.length > 1 %> -<%= t(".line1_multi") %>
+<%= t(".line1_multi") %>
<% @details.each do |detail| %> -<%= t(".detail", detail:) %>
+<%= t(".detail", detail:) %>
<% end %> <% else %> -<%= t(".line1", detail: @details[0]) %>
+<%= t(".line1", detail: @details[0]) %>
<% end %> -<%= t(".line2") %>
-<%= t(".line3") %>
+<%= t(".line2") %>
+<%= t(".line3") %>
<%= t(".cannot_calculate") %>
-<%= t(".caseworker_check") %>
-<%= t(".continue") %>
+<%= t(".cannot_calculate") %>
+<%= t(".caseworker_check") %>
+<%= t(".continue") %>
<%= detail %>
+<%= detail %>
<% end %><%= t(".line_1") %>
-<%= t(".line_2") %>
-<%= t(".line_3") %>
+<%= t(".line_1") %>
+ <%= govuk_list t(".details", + capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), + income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), + type: :bullet, + classes: "moj-interruption-card__body" %> + +<%= t(".line_2") %>
+<%= t(".line_3") %>
<%= detail %>
+<%= detail %>
<% end %><%= t(".body") %>
+ + <%= next_action_buttons_with_form( + url: providers_legal_aid_application_no_national_insurance_number_path, + method: :patch, + show_draft: true, + inverse_continue: true, + continue_button_text: t("generic.continue"), + ) %> + <% end %> +<%= t(".paragraph") %>
-<%= t(".paragraph") %>
- - <% end %> + + <% end %> +<%= t(".body_text") %>
-<%= t(".options") %>
-<%= t(".body_text") %>
+<%= t(".options") %>
- - <% end %> + <%= govuk_list t(".option_bullets"), type: :bullet, classes: "moj-interruption-card__body" %> + + + <% end %> +<%= t(".body_text") %>
diff --git a/app/views/providers/no_national_insurance_numbers/show.html.erb b/app/views/providers/no_national_insurance_numbers/show.html.erb index 0adfcd846f..c90657deb2 100644 --- a/app/views/providers/no_national_insurance_numbers/show.html.erb +++ b/app/views/providers/no_national_insurance_numbers/show.html.erb @@ -1,6 +1,6 @@<%= t(".body") %>
diff --git a/app/views/providers/proceedings_sca/interrupts/show.html.erb b/app/views/providers/proceedings_sca/interrupts/show.html.erb index 03aaa0a7d9..c93f22b84c 100644 --- a/app/views/providers/proceedings_sca/interrupts/show.html.erb +++ b/app/views/providers/proceedings_sca/interrupts/show.html.erb @@ -1,6 +1,6 @@<%= body_text %>
From 613dfb7219651c69d9e9ca4bcfc1529f740cbd47 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:40:04 +0000 Subject: [PATCH 12/14] AP-5608: Update confirm dwp non passported widths --- .../show.html.erb | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/app/views/providers/confirm_dwp_non_passported_applications/show.html.erb b/app/views/providers/confirm_dwp_non_passported_applications/show.html.erb index 78699c794c..2bdeaf179f 100644 --- a/app/views/providers/confirm_dwp_non_passported_applications/show.html.erb +++ b/app/views/providers/confirm_dwp_non_passported_applications/show.html.erb @@ -22,22 +22,27 @@<%= t(".hmrc_text") %>
- <% end %> + <%= form.govuk_radio_buttons_fieldset(:confirm_dwp_result, + legend: { size: "l", tag: "h2", text: t(".is_this_correct") }, + classes: "govuk-!-margin-bottom-6") do %> - <%= form.govuk_radio_button :confirm_dwp_result, "dwp_correct", link_errors: true, label: { text: t("generic.yes") } %> - <%= form.govuk_radio_button :confirm_dwp_result, "joint_with_partner_false", label: { text: t(".option_no") } %> - <% if @legal_aid_application.applicant.has_partner? %> - <%= form.govuk_radio_button :confirm_dwp_result, "joint_with_partner_true", label: { text: t(".option_partner") } %> - <% end %> + <% if display_hmrc_text? %> +<%= t(".hmrc_text") %>
+ <% end %> - <% end %> + <%= form.govuk_radio_button :confirm_dwp_result, "dwp_correct", link_errors: true, label: { text: t("generic.yes") } %> + <%= form.govuk_radio_button :confirm_dwp_result, "joint_with_partner_false", label: { text: t(".option_no") } %> + <% if @legal_aid_application.applicant.has_partner? %> + <%= form.govuk_radio_button :confirm_dwp_result, "joint_with_partner_true", label: { text: t(".option_partner") } %> + <% end %> - <%= next_action_buttons(show_draft: true, form:) %> + <% end %> + + <%= next_action_buttons(show_draft: true, form:) %> +<%= t(".line_1") %>
- <%= govuk_list t(".details", - capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), - income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), - type: :bullet, - classes: "moj-interruption-card__body" %> -<%= t(".line_2") %>
-<%= t(".line_1") %>
+<%= govuk_list t(".details", + capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), + income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), + type: :bullet, + classes: "moj-interruption-card__body" %> + +<%= t(".line_2") %>
diff --git a/app/views/shared/assessment_results/_capital_contribution_required.html.erb b/app/views/shared/assessment_results/_capital_contribution_required.html.erb index b31f8edea1..bec56bee51 100644 --- a/app/views/shared/assessment_results/_capital_contribution_required.html.erb +++ b/app/views/shared/assessment_results/_capital_contribution_required.html.erb @@ -3,10 +3,7 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= detail %>
- <% end %> -<%= detail %>
+<% end %> diff --git a/app/views/shared/assessment_results/_eligible.html.erb b/app/views/shared/assessment_results/_eligible.html.erb index ec0f9a019b..2f320973a0 100644 --- a/app/views/shared/assessment_results/_eligible.html.erb +++ b/app/views/shared/assessment_results/_eligible.html.erb @@ -2,10 +2,6 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= detail %>
- <% end %> -<%= detail %>
+<% end %> diff --git a/app/views/shared/assessment_results/_income_contribution_required.html.erb b/app/views/shared/assessment_results/_income_contribution_required.html.erb index 639efccee1..73413e43a6 100644 --- a/app/views/shared/assessment_results/_income_contribution_required.html.erb +++ b/app/views/shared/assessment_results/_income_contribution_required.html.erb @@ -3,10 +3,7 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= detail %>
- <% end %> -<%= detail %>
+<% end %> diff --git a/app/views/shared/assessment_results/_ineligible.html.erb b/app/views/shared/assessment_results/_ineligible.html.erb index aecbf554ac..cdddddc0ae 100644 --- a/app/views/shared/assessment_results/_ineligible.html.erb +++ b/app/views/shared/assessment_results/_ineligible.html.erb @@ -2,8 +2,4 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= sanitize(t(".detail", ineligible_reasons: ineligible_reasons(@cfe_result))) %>
-<%= sanitize(t(".detail", ineligible_reasons: ineligible_reasons(@cfe_result))) %>
diff --git a/app/views/shared/assessment_results/_manual_check_required.html.erb b/app/views/shared/assessment_results/_manual_check_required.html.erb index cd281e34b3..2a2b18125e 100644 --- a/app/views/shared/assessment_results/_manual_check_required.html.erb +++ b/app/views/shared/assessment_results/_manual_check_required.html.erb @@ -2,19 +2,15 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= t(".line1_eligible") %>
- <% elsif @details.length > 1 %> -<%= t(".line1_multi") %>
- <% @details.each do |detail| %> -<%= t(".detail", detail:) %>
- <% end %> - <% else %> -<%= t(".line1", detail: @details[0]) %>
- <% end %> -<%= t(".line2") %>
-<%= t(".line3") %>
-<%= t(".line1_eligible") %>
+<% elsif @details.length > 1 %> +<%= t(".line1_multi") %>
+ <% @details.each do |detail| %> +<%= t(".detail", detail:) %>
+ <% end %> +<% else %> +<%= t(".line1", detail: @details[0]) %>
+<% end %> +<%= t(".line2") %>
+<%= t(".line3") %>
diff --git a/app/views/shared/assessment_results/_no_cfe_result.html.erb b/app/views/shared/assessment_results/_no_cfe_result.html.erb index cd98b6c324..7773fae425 100644 --- a/app/views/shared/assessment_results/_no_cfe_result.html.erb +++ b/app/views/shared/assessment_results/_no_cfe_result.html.erb @@ -2,10 +2,6 @@ <%= t(".heading") %> -<%= t(".cannot_calculate") %>
-<%= t(".caseworker_check") %>
-<%= t(".continue") %>
-<%= t(".cannot_calculate") %>
+<%= t(".caseworker_check") %>
+<%= t(".continue") %>
diff --git a/app/views/shared/assessment_results/_partially_eligible_capital.html.erb b/app/views/shared/assessment_results/_partially_eligible_capital.html.erb index b31f8edea1..bec56bee51 100644 --- a/app/views/shared/assessment_results/_partially_eligible_capital.html.erb +++ b/app/views/shared/assessment_results/_partially_eligible_capital.html.erb @@ -3,10 +3,7 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= detail %>
- <% end %> -<%= detail %>
+<% end %> diff --git a/app/views/shared/assessment_results/_partially_eligible_capital_income.html.erb b/app/views/shared/assessment_results/_partially_eligible_capital_income.html.erb index 7f6bf743cf..f2a1c35fee 100644 --- a/app/views/shared/assessment_results/_partially_eligible_capital_income.html.erb +++ b/app/views/shared/assessment_results/_partially_eligible_capital_income.html.erb @@ -3,16 +3,13 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= t(".line_1") %>
- <%= govuk_list t(".details", - capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), - income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), - type: :bullet, - classes: "moj-interruption-card__body" %> -<%= t(".line_2") %>
-<%= t(".line_3") %>
-<%= t(".line_1") %>
+<%= govuk_list t(".details", + capital_contribution: gds_number_to_currency(@cfe_result.capital_contribution), + income_contribution: gds_number_to_currency(@cfe_result.income_contribution)), + type: :bullet, + classes: "moj-interruption-card__body" %> + +<%= t(".line_2") %>
+<%= t(".line_3") %>
diff --git a/app/views/shared/assessment_results/_partially_eligible_income.html.erb b/app/views/shared/assessment_results/_partially_eligible_income.html.erb index 639efccee1..73413e43a6 100644 --- a/app/views/shared/assessment_results/_partially_eligible_income.html.erb +++ b/app/views/shared/assessment_results/_partially_eligible_income.html.erb @@ -3,10 +3,7 @@ <%= t(".heading", name: @legal_aid_application.applicant_full_name) %> -<%= detail %>
- <% end %> -<%= detail %>
+<% end %> From 7f899d73c1604eb11df90dfcc6b5895933fe5241 Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Tue, 24 Dec 2024 15:14:18 +0000 Subject: [PATCH 14/14] AP-5608: Remove custom interruption styling Remove div with class from start page which is in now deleted interrupt stylesheet. There are no obvious visual changes after deletion --- app/assets/stylesheets/application.scss | 3 +- .../stylesheets/interruption-panel.scss | 63 ------------------- app/views/providers/start/index.html.erb | 40 ++++++------ 3 files changed, 20 insertions(+), 86 deletions(-) delete mode 100644 app/assets/stylesheets/interruption-panel.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index ffbff8a9b1..b6fa2c5362 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -22,7 +22,6 @@ $govuk-assets-path: "/"; @import "check-your-answers"; @import "govuk-mods"; @import "helpers"; -@import "interruption-panel"; @import "language-switcher"; @import "layout"; @import "long-email-truncation"; @@ -43,4 +42,4 @@ $govuk-assets-path: "/"; @import "dropzone/src/dropzone"; @import "dropzone/src/basic"; @import "providers/summary_list_action_width"; -@import "primary_navigation"; +@import "primary_navigation"; \ No newline at end of file diff --git a/app/assets/stylesheets/interruption-panel.scss b/app/assets/stylesheets/interruption-panel.scss deleted file mode 100644 index c559a44260..0000000000 --- a/app/assets/stylesheets/interruption-panel.scss +++ /dev/null @@ -1,63 +0,0 @@ -// stylelint-disable selector-max-id, selector-no-qualifying-type - -.interruption-panel { - padding: 30px; - background-color: #1d70b8; - - p, - h1, - h2, - ul, - label { - color: govuk-colour("white"); - } - - label { - font-size: 24px; - } - - .govuk-error-summary, - .govuk-error-message { - display: none; - } - - .govuk-error-summary + .govuk-grid-row .govuk-form-group { - padding-left: 15px; - border-left: 5px solid govuk-colour("white"); - } - - h2 { - font-size: 28px; - } - - .maximize-text-width { - padding: 1em 0; - float: none; - } - - .govuk-radios__label::before, - & ::after { - border-color: govuk-colour("black"); - color: govuk-colour("black"); - background-color: govuk-colour("white"); - } - - .govuk-inset-text { - border-left: $govuk-border-width-wide solid govuk-colour("white"); - color: govuk-colour("white"); - } - - .govuk-list--bullet{ - a, a:visited{ - color: govuk-colour("white"); - } - } -} - -@media (min-width: 769px) { - .interruption-panel { - padding: 60px; - } -} - -// stylelint-enable selector-max-id, selector-no-qualifying-type diff --git a/app/views/providers/start/index.html.erb b/app/views/providers/start/index.html.erb index 8dafa88d46..8bbc49bd69 100644 --- a/app/views/providers/start/index.html.erb +++ b/app/views/providers/start/index.html.erb @@ -4,29 +4,27 @@<%= t(".intro") %>
-<%= t(".use_service.list_title") %>
-<%= t(".use_service.list_title") %>
+<%= t(".dont_use_service.list_title") %>
-<%= t(".dont_use_service.list_title") %>
+<%= t(".use_ccms_para_html") %>
<%= t(".progress_saved") %>