From 23e872c0402bae64b4ee9b64e6699fc7f2dc0f1a Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 16 Jul 2024 11:36:59 +0100 Subject: [PATCH] add missing page titles to FE journey --- .../journeys/further_education_payments.rb | 3 +- .../claims/_courses.html.erb | 2 ++ ..._teaching_less_than_2_5_next_term.html.erb | 2 +- .../claims/contract_type.html.erb | 26 ++++++++++------- .../claims/eligible.html.erb | 4 ++- .../claims/fixed_term_contract.html.erb | 2 ++ ...urther_education_provision_search.html.erb | 2 ++ ...her_education_teaching_start_year.html.erb | 2 ++ .../claims/half_teaching_hours.html.erb | 2 ++ .../claims/ineligible.html.erb | 2 ++ .../claims/poor_performance.html.erb | 2 ++ .../claims/select_provision.html.erb | 28 +++++++++++-------- .../claims/subjects_taught.html.erb | 2 ++ .../claims/taught_at_least_one_term.html.erb | 2 ++ .../claims/teaching_hours_per_week.html.erb | 2 ++ ...teaching_hours_per_week_next_term.html.erb | 2 ++ .../claims/teaching_qualification.html.erb | 2 ++ .../claims/teaching_responsibilities.html.erb | 2 ++ config/locales/en.yml | 22 +++++++++++++++ 19 files changed, 87 insertions(+), 24 deletions(-) diff --git a/app/models/journeys/further_education_payments.rb b/app/models/journeys/further_education_payments.rb index 8facc123c5..a373f030d3 100644 --- a/app/models/journeys/further_education_payments.rb +++ b/app/models/journeys/further_education_payments.rb @@ -30,7 +30,8 @@ module FurtherEducationPayments "poor-performance" => PoorPerformanceForm, "check-your-answers" => CheckYourAnswersForm, "ineligible" => IneligibleForm, - "half-teaching-hours" => HalfTeachingHoursForm + "half-teaching-hours" => HalfTeachingHoursForm, + "eligible" => EligibleForm } } end diff --git a/app/views/further_education_payments/claims/_courses.html.erb b/app/views/further_education_payments/claims/_courses.html.erb index ff34fb6e4f..6c835b6baf 100644 --- a/app/views/further_education_payments/claims/_courses.html.erb +++ b/app/views/further_education_payments/claims/_courses.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/_ineligible_teaching_less_than_2_5_next_term.html.erb b/app/views/further_education_payments/claims/_ineligible_teaching_less_than_2_5_next_term.html.erb index b3420f6a0d..de0d2534f2 100644 --- a/app/views/further_education_payments/claims/_ineligible_teaching_less_than_2_5_next_term.html.erb +++ b/app/views/further_education_payments/claims/_ineligible_teaching_less_than_2_5_next_term.html.erb @@ -1,7 +1,7 @@

- You are not eligible + <%= @form.t("#{@form.journey_eligibility_checker.ineligibility_reason}.heading") %>

diff --git a/app/views/further_education_payments/claims/contract_type.html.erb b/app/views/further_education_payments/claims/contract_type.html.erb index 6da1881189..071269a7e8 100644 --- a/app/views/further_education_payments/claims/contract_type.html.erb +++ b/app/views/further_education_payments/claims/contract_type.html.erb @@ -1,12 +1,18 @@ -<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> - <%= f.govuk_error_summary %> +<% content_for(:page_title, page_title(@form.t(:question, school_name: journey_session.answers.school.name), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> - <%= f.govuk_collection_radio_buttons :contract_type, @form.radio_options, :id, :name, :hint, - legend: { - text: @form.t(:question, school_name: journey_session.answers.school.name), - tag: "h1", - size: "l" - } %> +

+
+ <%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> + <%= f.govuk_error_summary %> - <%= f.govuk_submit %> -<% end %> + <%= f.govuk_collection_radio_buttons :contract_type, @form.radio_options, :id, :name, :hint, + legend: { + text: @form.t(:question, school_name: journey_session.answers.school.name), + tag: "h1", + size: "l" + } %> + + <%= f.govuk_submit %> + <% end %> +
+
diff --git a/app/views/further_education_payments/claims/eligible.html.erb b/app/views/further_education_payments/claims/eligible.html.erb index 9a1a8936d9..c992d31013 100644 --- a/app/views/further_education_payments/claims/eligible.html.erb +++ b/app/views/further_education_payments/claims/eligible.html.erb @@ -1,8 +1,10 @@ +<% content_for(:page_title, page_title(@form.t(:heading), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> <%= govuk_panel( - title_text: "You’re eligible for a financial incentive payment", + title_text: @form.t(:heading), html_attributes: { class: "govuk-panel--informational" } diff --git a/app/views/further_education_payments/claims/fixed_term_contract.html.erb b/app/views/further_education_payments/claims/fixed_term_contract.html.erb index fc16c09e1f..f7a2ff8dcb 100644 --- a/app/views/further_education_payments/claims/fixed_term_contract.html.erb +++ b/app/views/further_education_payments/claims/fixed_term_contract.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question, academic_year: @form.current_academic_year.to_s(:long)), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/further_education_provision_search.html.erb b/app/views/further_education_payments/claims/further_education_provision_search.html.erb index a814e016be..26b68aa245 100644 --- a/app/views/further_education_payments/claims/further_education_provision_search.html.erb +++ b/app/views/further_education_payments/claims/further_education_provision_search.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, diff --git a/app/views/further_education_payments/claims/further_education_teaching_start_year.html.erb b/app/views/further_education_payments/claims/further_education_teaching_start_year.html.erb index 1c12135be6..94474062b2 100644 --- a/app/views/further_education_payments/claims/further_education_teaching_start_year.html.erb +++ b/app/views/further_education_payments/claims/further_education_teaching_start_year.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/half_teaching_hours.html.erb b/app/views/further_education_payments/claims/half_teaching_hours.html.erb index 1767eee6ab..f0778e7ba5 100644 --- a/app/views/further_education_payments/claims/half_teaching_hours.html.erb +++ b/app/views/further_education_payments/claims/half_teaching_hours.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/ineligible.html.erb b/app/views/further_education_payments/claims/ineligible.html.erb index d95a12b23f..a4937bcb7b 100644 --- a/app/views/further_education_payments/claims/ineligible.html.erb +++ b/app/views/further_education_payments/claims/ineligible.html.erb @@ -1 +1,3 @@ +<% content_for(:page_title, page_title(@form.t("#{@form.journey_eligibility_checker.ineligibility_reason}.heading"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> + <%= render "ineligible_#{@form.journey_eligibility_checker.ineligibility_reason}" %> diff --git a/app/views/further_education_payments/claims/poor_performance.html.erb b/app/views/further_education_payments/claims/poor_performance.html.erb index 48323259eb..bbaacddfd6 100644 --- a/app/views/further_education_payments/claims/poor_performance.html.erb +++ b/app/views/further_education_payments/claims/poor_performance.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:heading), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/select_provision.html.erb b/app/views/further_education_payments/claims/select_provision.html.erb index 69b48e4bae..d9799df4e1 100644 --- a/app/views/further_education_payments/claims/select_provision.html.erb +++ b/app/views/further_education_payments/claims/select_provision.html.erb @@ -1,13 +1,19 @@ -<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> - <%= f.govuk_error_summary %> +<% content_for(:page_title, page_title(@form.t(:heading), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> - <%= f.govuk_collection_radio_buttons :school_id, @form.radio_options, :id, :name, :address, - legend: { - text: "Select the college you teach at", - tag: "h1", - size: "l" - }, - hint: { text: "Select your college from the search results." } %> +
+
+ <%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> + <%= f.govuk_error_summary %> - <%= f.govuk_submit %> -<% end %> + <%= f.govuk_collection_radio_buttons :school_id, @form.radio_options, :id, :name, :address, + legend: { + text: @form.t("heading"), + tag: "h1", + size: "l" + }, + hint: { text: "Select your college from the search results." } %> + + <%= f.govuk_submit %> + <% end %> +
+
diff --git a/app/views/further_education_payments/claims/subjects_taught.html.erb b/app/views/further_education_payments/claims/subjects_taught.html.erb index 3a85dcbeae..b7f9a8d053 100644 --- a/app/views/further_education_payments/claims/subjects_taught.html.erb +++ b/app/views/further_education_payments/claims/subjects_taught.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/taught_at_least_one_term.html.erb b/app/views/further_education_payments/claims/taught_at_least_one_term.html.erb index 24d86e8af3..800a093d35 100644 --- a/app/views/further_education_payments/claims/taught_at_least_one_term.html.erb +++ b/app/views/further_education_payments/claims/taught_at_least_one_term.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question, school_name: journey_session.answers.school.name), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/teaching_hours_per_week.html.erb b/app/views/further_education_payments/claims/teaching_hours_per_week.html.erb index f8592511e5..34421c391f 100644 --- a/app/views/further_education_payments/claims/teaching_hours_per_week.html.erb +++ b/app/views/further_education_payments/claims/teaching_hours_per_week.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question, school_name: journey_session.answers.school.name), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/teaching_hours_per_week_next_term.html.erb b/app/views/further_education_payments/claims/teaching_hours_per_week_next_term.html.erb index a9d29a91c5..2439b1d243 100644 --- a/app/views/further_education_payments/claims/teaching_hours_per_week_next_term.html.erb +++ b/app/views/further_education_payments/claims/teaching_hours_per_week_next_term.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question, school_name: journey_session.answers.school.name), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/teaching_qualification.html.erb b/app/views/further_education_payments/claims/teaching_qualification.html.erb index bcbdcae16d..8b7d2182cf 100644 --- a/app/views/further_education_payments/claims/teaching_qualification.html.erb +++ b/app/views/further_education_payments/claims/teaching_qualification.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> +
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %> diff --git a/app/views/further_education_payments/claims/teaching_responsibilities.html.erb b/app/views/further_education_payments/claims/teaching_responsibilities.html.erb index 4c68310d01..02b3fd85a1 100644 --- a/app/views/further_education_payments/claims/teaching_responsibilities.html.erb +++ b/app/views/further_education_payments/claims/teaching_responsibilities.html.erb @@ -1,3 +1,5 @@ +<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> + <% @backlink_path = landing_page_path %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 4fa299455a..00beeacd15 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -818,6 +818,25 @@ en: feedback_email: "FE-Levellingup.PremiumPayments@education.gov.uk" support_email_address: "FE-Levellingup.PremiumPayments@education.gov.uk" forms: + ineligible: + courses: + heading: You are not eligible + lack_teaching_responsibilities: + heading: You are not eligible + lacks_teacher_qualification_or_enrolment: + heading: You are not eligible + must_at_least_half_hours_teaching_fe: + heading: You are not eligible + must_be_recent_further_education_teacher: + heading: You are not eligible + must_teach_at_least_one_term: + heading: You are not eligible for a financial incentive payment yet + subject_to_problematic_actions: + heading: You are not eligible + ineligible_teaching_less_than_2_5: + heading: You are not eligible + teaching_less_than_2_5_next_term: + heading: You are not eligible teaching_responsibilities: question: Are you a member of staff with teaching responsibilities? errors: @@ -828,6 +847,7 @@ en: blank: Enter a college name or postcode min_length: Enter a college name or postcode that is at least 3 characters long select_provision: + heading: Select the college you teach at errors: blank: Select the college you teach at contract_type: @@ -991,6 +1011,8 @@ en: question: Are at least half of your timetabled teaching hours spent teaching 16 to 19-year-olds, including those up to age 25 with an Education, Health and Care Plan (EHCP)? errors: inclusion: Select yes if at least half your timetabled teaching hours are spent teaching 16-19-year-olds, including those up to 25 with an Education, Health and Care Plan + eligible: + heading: You’re eligible for a financial incentive payment check_your_answers: part_one: primary_heading: Check your answers