Skip to content

Commit

Permalink
Merge pull request #3011 from DFE-Digital/fe-error-titles
Browse files Browse the repository at this point in the history
[LUPEYALPHA-696] Add missing page titles to FE journey
  • Loading branch information
asmega authored Jul 19, 2024
2 parents deb6fed + 23e872c commit 2b41083
Show file tree
Hide file tree
Showing 19 changed files with 87 additions and 24 deletions.
3 changes: 2 additions & 1 deletion app/models/journeys/further_education_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/views/further_education_payments/claims/_courses.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">
You are not eligible
<%= @form.t("#{@form.journey_eligibility_checker.ineligibility_reason}.heading") %>
</h1>

<p class="govuk-body">
Expand Down
26 changes: 16 additions & 10 deletions app/views/further_education_payments/claims/contract_type.html.erb
Original file line number Diff line number Diff line change
@@ -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"
} %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= 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 %>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<% content_for(:page_title, page_title(@form.t(:heading), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= 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"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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}" %>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:heading), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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." } %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= 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 %>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for(:page_title, page_title(@form.t(:question), journey: current_journey_routing_name, show_error: @form.errors.any?)) %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 %>

<div class="govuk-grid-row">
Expand Down
22 changes: 22 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,25 @@ en:
feedback_email: "[email protected]"
support_email_address: "[email protected]"
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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2b41083

Please sign in to comment.