diff --git a/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb b/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb index 749eec2770..3950386ca3 100644 --- a/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb +++ b/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb @@ -63,15 +63,17 @@ def course_descriptions @course_descriptions ||= claim.eligibility.courses_taught.map(&:description) end + def claimant_contract_of_employment + claimant_option_selected( + "contract_type", + claim.eligibility.contract_type + ).downcase + end + def teaching_hours_per_week - I18n.t( - [ - "further_education_payments", - "forms", - "teaching_hours_per_week", - "options", - claim.eligibility.teaching_hours_per_week - ].join(".") + claimant_option_selected( + "teaching_hours_per_week", + claim.eligibility.teaching_hours_per_week ).downcase end @@ -132,6 +134,18 @@ def permitted_attributes super + [assertions_attributes: AssertionForm.attribute_names] end + def claimant_option_selected(question, option) + I18n.t( + [ + "further_education_payments", + "forms", + question, + "options", + option + ].join(".") + ) + end + # Make sure the errors in the summary link to the correct nested field def all_assertions_answered assertions.each(&:validate).each_with_index do |assertion, i| diff --git a/app/views/further_education_payments/provider/claims/verify_claim.html.erb b/app/views/further_education_payments/provider/claims/verify_claim.html.erb index 2418aa6baf..11b816c864 100644 --- a/app/views/further_education_payments/provider/claims/verify_claim.html.erb +++ b/app/views/further_education_payments/provider/claims/verify_claim.html.erb @@ -63,7 +63,8 @@ [:assertions, f.object.contract_type, ff.object.name, :label], claimant: f.object.claimant_name, provider: f.object.claim.school.name, - hours: f.object.teaching_hours_per_week + hours: f.object.teaching_hours_per_week, + type_of_contract: f.object.claimant_contract_of_employment ), }, hint: -> do diff --git a/config/locales/en.yml b/config/locales/en.yml index fc0dd80fbe..16e832729e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1174,7 +1174,7 @@ en: assertions: fixed_contract: contract_type: - label: "Does %{claimant} have a permanent contract of employment at %{provider}?" + label: "Does %{claimant} have a %{type_of_contract} contract of employment at %{provider}?" errors: inclusion: "Select yes if %{claimant} has a fixed term contract of employment at %{provider}" teaching_responsibilities: