From 3390611ee282e8a331b5b7208e7ef110f8ce5022 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Fri, 14 Jun 2024 11:36:21 +0100 Subject: [PATCH 1/3] install and configure govuk components --- Gemfile | 2 ++ Gemfile.lock | 9 +++++++++ config/application.rb | 2 ++ 3 files changed, 13 insertions(+) diff --git a/Gemfile b/Gemfile index f876b98cb2..21fb5983ae 100644 --- a/Gemfile +++ b/Gemfile @@ -66,6 +66,8 @@ gem "daemons" # Gov form builder to structure claims gem "govuk_design_system_formbuilder", "~> 5.3.2" +gem "govuk-components" + # See https://github.com/typhoeus/ethon/issues/185 gem "ethon", "~> 0.16.0" gem "typhoeus", "~> 1.4.1" diff --git a/Gemfile.lock b/Gemfile.lock index cf9a307c29..95b17b01e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -210,6 +210,10 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) + govuk-components (5.4.0) + html-attributes-utils (~> 1.0.0, >= 1.0.0) + pagy (>= 6, < 9) + view_component (>= 3.9, < 3.13) govuk_design_system_formbuilder (5.3.3) actionview (>= 6.1) activemodel (>= 6.1) @@ -517,6 +521,10 @@ GEM validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix + view_component (3.12.1) + activesupport (>= 5.2.0, < 8.0) + concurrent-ruby (~> 1.0) + method_source (~> 1.0) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -559,6 +567,7 @@ DEPENDENCIES faker (~> 3.4) faraday_middleware foreman + govuk-components govuk_design_system_formbuilder (~> 5.3.2) httpclient jbuilder (~> 2.12) diff --git a/config/application.rb b/config/application.rb index 895da5ea96..016ad05e2b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,6 +24,8 @@ require_relative "../lib/dqt" require_relative "../lib/notify_sms_message" +require "govuk/components" + # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) From 1862dc675b2f35e20a46b9a2193d9ddbbd1dc2ba Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Fri, 14 Jun 2024 11:36:48 +0100 Subject: [PATCH 2/3] use govuk_link_to --- app/views/additional_payments/landing_page.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/additional_payments/landing_page.html.erb b/app/views/additional_payments/landing_page.html.erb index 925a699ec3..05b5db5d71 100644 --- a/app/views/additional_payments/landing_page.html.erb +++ b/app/views/additional_payments/landing_page.html.erb @@ -78,10 +78,11 @@ From ecd70689658a5cabd079839bac4b7822d9e676f3 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Fri, 14 Jun 2024 11:38:44 +0100 Subject: [PATCH 3/3] use govuk details --- .../additional_payments/landing_page.html.erb | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/app/views/additional_payments/landing_page.html.erb b/app/views/additional_payments/landing_page.html.erb index 05b5db5d71..cc54f0161a 100644 --- a/app/views/additional_payments/landing_page.html.erb +++ b/app/views/additional_payments/landing_page.html.erb @@ -67,30 +67,25 @@ Payments are given up to 16 weeks from applying. You will receive an approval email with further information on your application.

-
- - The different additional payments - -
-

- There are 2 types of additional payment. You may be eligible for both payments, but you will only be able to apply for one each year. -

- -
    -
  • - <%= govuk_link_to "Early-career payment (opens in new tab)", Policies::EarlyCareerPayments.eligibility_page_url, no_visited_state: true, target: "_blank" %> - payment of up to £7,500 for eligible teachers including language teachers. -
  • - -
  • - <%= govuk_link_to "Levelling up premium payment (opens in new tab)", Policies::LevellingUpPremiumPayments.eligibility_page_url, no_visited_state: true, target: "_blank" %> - payment of up to £3,000 for eligible teachers in certain schools, including computing teachers. -
  • -
- -

- Both schemes offer the largest payments to those teaching in more disadvantaged areas and schools. -

-
-
+ <%= govuk_details(summary_text: "The different additional payments") do %> +

+ There are 2 types of additional payment. You may be eligible for both payments, but you will only be able to apply for one each year. +

+ +
    +
  • + <%= govuk_link_to "Early-career payment (opens in new tab)", Policies::EarlyCareerPayments.eligibility_page_url, no_visited_state: true, target: "_blank" %> - payment of up to £7,500 for eligible teachers including language teachers. +
  • + +
  • + <%= govuk_link_to "Levelling up premium payment (opens in new tab)", Policies::LevellingUpPremiumPayments.eligibility_page_url, no_visited_state: true, target: "_blank" %> - payment of up to £3,000 for eligible teachers in certain schools, including computing teachers. +
  • +
+ +

+ Both schemes offer the largest payments to those teaching in more disadvantaged areas and schools. +

+ <% end %>

Claim back your student loan repayments