From da736c4996d6f4dbdb3a9ade987bf357b1b8d9fd Mon Sep 17 00:00:00 2001 From: Ben Abraham <16797406+Kizr@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:18:10 +0000 Subject: [PATCH 1/2] Update disclaimer copy text --- .../claims/claim/mentors_form/disclaimer_component.rb | 2 +- app/views/claims/schools/claims/mentors/_form.html.erb | 4 ++-- .../claims/claim/mentors_form/disclaimer_component.yml | 5 +++-- .../claim/mentors_form/disclaimer_component_spec.rb | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/components/claims/claim/mentors_form/disclaimer_component.rb b/app/components/claims/claim/mentors_form/disclaimer_component.rb index a33d92ef5..a614dbb5c 100644 --- a/app/components/claims/claim/mentors_form/disclaimer_component.rb +++ b/app/components/claims/claim/mentors_form/disclaimer_component.rb @@ -8,7 +8,7 @@ def initialize(mentors_form:, classes: [], html_attributes: {}) end def call - govuk_inset_text do + govuk_details summary_text: t(".mentor_not_listed") do tag.p(sanitize(t(".disclaimer", provider_name:))) + tag.p(sanitize(t(".disclaimer_contact", email_link:))) end diff --git a/app/views/claims/schools/claims/mentors/_form.html.erb b/app/views/claims/schools/claims/mentors/_form.html.erb index ab5fa9add..921dba917 100644 --- a/app/views/claims/schools/claims/mentors/_form.html.erb +++ b/app/views/claims/schools/claims/mentors/_form.html.erb @@ -8,8 +8,6 @@ <% if claim_mentors_form.mentors_with_claimable_hours.any? %>

<%= t(".heading", provider_name: claim_mentors_form.claim.provider_name) %>

- <%= render Claims::Claim::MentorsForm::DisclaimerComponent.new(mentors_form: claim_mentors_form) %> - <%= f.govuk_collection_check_boxes( :mentor_ids, claim_mentors_form.mentors_with_claimable_hours, @@ -20,6 +18,8 @@ hint: { text: t(".select_all_that_apply") }, ) %> + <%= render Claims::Claim::MentorsForm::DisclaimerComponent.new(mentors_form: claim_mentors_form) %> + <%= f.govuk_submit t("continue") %>

diff --git a/config/locales/en/components/claims/claim/mentors_form/disclaimer_component.yml b/config/locales/en/components/claims/claim/mentors_form/disclaimer_component.yml index 9b9509a48..345d4db98 100644 --- a/config/locales/en/components/claims/claim/mentors_form/disclaimer_component.yml +++ b/config/locales/en/components/claims/claim/mentors_form/disclaimer_component.yml @@ -4,5 +4,6 @@ en: claim: mentors_form: disclaimer_component: - disclaimer: This list includes all mentors who can be included on a claim. If a mentor you have added is not showing in this list, that is because they have already had 20 hours of training claimed for with %{provider_name}. - disclaimer_contact: Contact %{email_link} if you think there is a problem. + disclaimer: If a mentor you have added is not showing in the list, they have already claimed 20 hours with %{provider_name}. + disclaimer_contact: If you think this is a mistake, contact %{email_link}. + mentor_not_listed: My mentor is not listed diff --git a/spec/components/claims/claim/mentors_form/disclaimer_component_spec.rb b/spec/components/claims/claim/mentors_form/disclaimer_component_spec.rb index 2a161b109..70a514563 100644 --- a/spec/components/claims/claim/mentors_form/disclaimer_component_spec.rb +++ b/spec/components/claims/claim/mentors_form/disclaimer_component_spec.rb @@ -24,12 +24,12 @@ create(:mentor_training, claim: create(:claim, :submitted, school:), mentor: school.mentors.first, provider: claim.provider, hours_completed: 20) end - it "renders an inset text block with information about why a mentor is missing from the list" do + it "renders a details block with information about why a mentor is missing from the list" do render_inline described_class.new(mentors_form:) - expect(page).to have_css(".govuk-inset-text") - expect(page).to have_content "This list includes all mentors who can be included on a claim. If a mentor you have added is not showing in this list, that is because they have already had 20 hours of training claimed for with #{claim.provider.name}." - expect(page).to have_content "Contact ittmentor.funding@education.gov.uk if you think there is a problem." + expect(page).to have_css(".govuk-details") + expect(page).to have_content "If a mentor you have added is not showing in the list, they have already claimed 20 hours with #{claim.provider.name}." + expect(page).to have_content "If you think this is a mistake, contact ittmentor.funding@education.gov.uk." end end end From c7905ab1efb6a605dcf7d49a501eb66894cb8b99 Mon Sep 17 00:00:00 2001 From: Ben Abraham <16797406+Kizr@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:18:26 +0000 Subject: [PATCH 2/2] Update guidance copy text --- app/views/claims/schools/claims/index.html.erb | 5 ++--- config/locales/en.yml | 1 + config/locales/en/claims/schools/claims.yml | 4 +--- spec/system/claims/schools/claims/view_claims_spec.rb | 4 +++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/claims/schools/claims/index.html.erb b/app/views/claims/schools/claims/index.html.erb index 5f801240a..85e0b6378 100644 --- a/app/views/claims/schools/claims/index.html.erb +++ b/app/views/claims/schools/claims/index.html.erb @@ -6,9 +6,8 @@ <% if policy(Claims::Claim).create? %> <% if @school.mentors.any? %> - <%= govuk_inset_text do %> -

<%= t(".guidance") %>

-

<%= sanitize t(".closing_date_disclaimer", time: l(Claims::ClaimWindow.current.ends_on.end_of_day, format: :time_on_date)) %>

+ <%= govuk_warning_text do %> +

<%= t(".guidance", end_date: l(Claims::ClaimWindow.current.ends_on, format: :long_with_day), start_year: Claims::ClaimWindow.current.starts_on.year, end_year: Claims::ClaimWindow.current.ends_on.year) %>

<% end %> <%= govuk_link_to t(".add_claim"), new_claims_school_claim_path, class: "govuk-button" %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 867807a71..e30232a29 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -24,6 +24,7 @@ en: formats: month: "%B" long: "%-d %B %Y" + long_with_day: "%A %-d %B %Y" short: "%d/%m/%Y" time: formats: diff --git a/config/locales/en/claims/schools/claims.yml b/config/locales/en/claims/schools/claims.yml index b0de995cb..bcb5c0abf 100644 --- a/config/locales/en/claims/schools/claims.yml +++ b/config/locales/en/claims/schools/claims.yml @@ -47,9 +47,7 @@ en: index: heading: Claims add_claim: Add claim - guidance: Claims can only be made for the school year September 2023 to July 2024. - closing_date_disclaimer_title: Important - closing_date_disclaimer: You must submit a claim by %{time}. + guidance: You have until 11:59pm on %{end_date} to submit claims for the school year September %{start_year} to July %{end_year}. add_mentor_guidance_html: Before you can start a claim you will need to %{link_to}. add_a_mentor: add a mentor window_closed: Claims can no longer be submitted for school year September %{start_year} to July %{end_year}. diff --git a/spec/system/claims/schools/claims/view_claims_spec.rb b/spec/system/claims/schools/claims/view_claims_spec.rb index 5dd2fa84e..02e9e0d8a 100644 --- a/spec/system/claims/schools/claims/view_claims_spec.rb +++ b/spec/system/claims/schools/claims/view_claims_spec.rb @@ -43,6 +43,8 @@ ) end + let(:claim_window) { Claims::ClaimWindow.current } + before do create(:claim, status: :internal_draft, school:) given_there_is_a_current_claim_window @@ -102,7 +104,7 @@ def i_can_see_the_no_records_message def i_can_see_the_claim_guidance within(first(".govuk-body")) do expect(page).to have_content( - "Claims can only be made for the school year September 2023 to July 2024.", + "You have until 11:59pm on #{I18n.l(claim_window.ends_on, format: :long_with_day)} to submit claims for the school year September #{claim_window.starts_on.year} to July #{claim_window.ends_on.year}.", ) end end