diff --git a/app/models/form/lettings/pages/previous_housing_situation.rb b/app/models/form/lettings/pages/previous_housing_situation.rb index aafabe7f3..8fc907435 100644 --- a/app/models/form/lettings/pages/previous_housing_situation.rb +++ b/app/models/form/lettings/pages/previous_housing_situation.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousHousingSituation < ::Form::Page def initialize(id, hsh, subsection) super @id = "previous_housing_situation" + @copy_key = "lettings.household_situation.prevten.not_renewal" @depends_on = [{ "is_renewal?" => false }] end diff --git a/app/models/form/lettings/pages/previous_housing_situation_renewal.rb b/app/models/form/lettings/pages/previous_housing_situation_renewal.rb index 317350911..62d37bf33 100644 --- a/app/models/form/lettings/pages/previous_housing_situation_renewal.rb +++ b/app/models/form/lettings/pages/previous_housing_situation_renewal.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousHousingSituationRenewal < ::Form::Page def initialize(id, hsh, subsection) super @id = "previous_housing_situation_renewal" + @copy_key = "lettings.household_situation.prevten.renewal" @depends_on = [{ "is_renewal?" => true, "is_supported_housing?" => true }] end diff --git a/app/models/form/lettings/pages/previous_local_authority.rb b/app/models/form/lettings/pages/previous_local_authority.rb index 48233e64a..30a17448f 100644 --- a/app/models/form/lettings/pages/previous_local_authority.rb +++ b/app/models/form/lettings/pages/previous_local_authority.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousLocalAuthority < ::Form::Page def initialize(id, hsh, subsection) super @id = "previous_local_authority" + @copy_key = "lettings.household_situation.previous_local_authority" @depends_on = [{ "is_previous_la_inferred" => false, "renewal" => 0 }] end diff --git a/app/models/form/lettings/pages/previous_postcode.rb b/app/models/form/lettings/pages/previous_postcode.rb index 61d08f3a9..0bf0d108f 100644 --- a/app/models/form/lettings/pages/previous_postcode.rb +++ b/app/models/form/lettings/pages/previous_postcode.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::PreviousPostcode < ::Form::Page def initialize(id, hsh, page) super @depends_on = [{ "renewal" => 0 }] + @copy_key = "lettings.household_situation.previous_postcode" end def questions diff --git a/app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb b/app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb index f5e3a24d1..a32dab9a2 100644 --- a/app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb +++ b/app/models/form/lettings/pages/reason_for_leaving_last_settled_home.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReasonForLeavingLastSettledHome < ::Form::Page def initialize(id, hsh, subsection) super @id = "reason_for_leaving_last_settled_home" + @copy_key = "lettings.household_situation.reason.reason_for_leaving_last_settled_home" @depends_on = [{ "renewal" => 0 }] end diff --git a/app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb b/app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb index acc8e7045..0a052b300 100644 --- a/app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb +++ b/app/models/form/lettings/pages/reason_for_leaving_last_settled_home_renewal.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReasonForLeavingLastSettledHomeRenewal < ::Form::Pa def initialize(id, hsh, subsection) super @id = "reason_for_leaving_last_settled_home_renewal" + @copy_key = "lettings.household_situation.reason.reason_for_leaving_last_settled_home_renewal" @depends_on = [{ "renewal" => 1 }] end diff --git a/app/models/form/lettings/pages/referral.rb b/app/models/form/lettings/pages/referral.rb index 9bda8c77e..8b6fcadbb 100644 --- a/app/models/form/lettings/pages/referral.rb +++ b/app/models/form/lettings/pages/referral.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::Referral < ::Form::Page def initialize(id, hsh, subsection) super @id = "referral" + @copy_key = "lettings.household_situation.referral.general_needs.la" @depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 1, "renewal" => 0 }] end diff --git a/app/models/form/lettings/pages/referral_prp.rb b/app/models/form/lettings/pages/referral_prp.rb index d9c37b6d6..baeb01784 100644 --- a/app/models/form/lettings/pages/referral_prp.rb +++ b/app/models/form/lettings/pages/referral_prp.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralPrp < ::Form::Page def initialize(id, hsh, subsection) super @id = "referral_prp" + @copy_key = "lettings.household_situation.referral.general_needs.prp" @depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 1, "renewal" => 0 }] end diff --git a/app/models/form/lettings/pages/referral_supported_housing.rb b/app/models/form/lettings/pages/referral_supported_housing.rb index 8464ae366..a3e915e26 100644 --- a/app/models/form/lettings/pages/referral_supported_housing.rb +++ b/app/models/form/lettings/pages/referral_supported_housing.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousing < ::Form::Page def initialize(id, hsh, subsection) super @id = "referral_supported_housing" + @copy_key = "lettings.household_situation.referral.supported_housing.la" @depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 2, "renewal" => 0 }] end diff --git a/app/models/form/lettings/pages/referral_supported_housing_prp.rb b/app/models/form/lettings/pages/referral_supported_housing_prp.rb index 289ae5eb6..66b6f370e 100644 --- a/app/models/form/lettings/pages/referral_supported_housing_prp.rb +++ b/app/models/form/lettings/pages/referral_supported_housing_prp.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousingPrp < ::Form::Page def initialize(id, hsh, subsection) super @id = "referral_supported_housing_prp" + @copy_key = "lettings.household_situation.referral.supported_housing.prp" @depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 2, "renewal" => 0 }] end diff --git a/app/models/form/lettings/questions/homeless.rb b/app/models/form/lettings/questions/homeless.rb index 081e1a8cf..1194fa929 100644 --- a/app/models/form/lettings/questions/homeless.rb +++ b/app/models/form/lettings/questions/homeless.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Homeless < ::Form::Question def initialize(id, hsh, page) super @id = "homeless" - @check_answer_label = "Household homeless immediately before letting" - @header = "Did the household experience homelessness immediately before this letting?" @type = "radio" @check_answers_card_number = 0 - @hint_text = "" @answer_options = ANSWER_OPTIONS @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/layear.rb b/app/models/form/lettings/questions/layear.rb index 5c2e9c195..63f99c36f 100644 --- a/app/models/form/lettings/questions/layear.rb +++ b/app/models/form/lettings/questions/layear.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Layear < ::Form::Question def initialize(id, hsh, page) super @id = "layear" - @check_answer_label = "Length of time in local authority area" - @header = "How long has the household continuously lived in the local authority area of the new letting?" @type = "radio" @check_answers_card_number = 0 - @hint_text = "" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/letting_allocation.rb b/app/models/form/lettings/questions/letting_allocation.rb index c9742e97f..0ae7b740d 100644 --- a/app/models/form/lettings/questions/letting_allocation.rb +++ b/app/models/form/lettings/questions/letting_allocation.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question def initialize(id, hsh, page) super @id = "letting_allocation" - @check_answer_label = "Allocation system" - @header = "How was this letting allocated?" @type = "checkbox" @check_answers_card_number = 0 - @hint_text = "Select all that apply." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/ppcodenk.rb b/app/models/form/lettings/questions/ppcodenk.rb index 4af3b17f0..5eec607eb 100644 --- a/app/models/form/lettings/questions/ppcodenk.rb +++ b/app/models/form/lettings/questions/ppcodenk.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question def initialize(id, hsh, page) super @id = "ppcodenk" - @check_answer_label = "" - @header = "Do you know the postcode of the household’s last settled accommodation?" + @copy_key = "lettings.household_situation.previous_postcode.ppcodenk" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." : "This is also known as the household’s ‘last settled home’." @answer_options = ANSWER_OPTIONS @conditional_for = { "ppostcode_full" => [0] } @hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] } diff --git a/app/models/form/lettings/questions/ppostcode_full.rb b/app/models/form/lettings/questions/ppostcode_full.rb index ed0439805..804576ca1 100644 --- a/app/models/form/lettings/questions/ppostcode_full.rb +++ b/app/models/form/lettings/questions/ppostcode_full.rb @@ -2,8 +2,7 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question def initialize(id, hsh, page) super @id = "ppostcode_full" - @check_answer_label = "Postcode of household’s last settled accommodation" - @header = "Postcode for the previous accommodation" + @copy_key = "lettings.household_situation.previous_postcode.ppostcode_full" @type = "text" @width = 5 @inferred_check_answers_value = [{ @@ -13,7 +12,6 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question "value" => "Not known", }] @check_answers_card_number = 0 - @hint_text = "" @inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } } @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @disable_clearing_if_not_routed_or_dynamic_answer_options = true diff --git a/app/models/form/lettings/questions/previous_la_known.rb b/app/models/form/lettings/questions/previous_la_known.rb index d99c1e057..2145e9d1f 100644 --- a/app/models/form/lettings/questions/previous_la_known.rb +++ b/app/models/form/lettings/questions/previous_la_known.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::PreviousLaKnown < ::Form::Question def initialize(id, hsh, page) super @id = "previous_la_known" - @check_answer_label = "Do you know the local authority of the household’s last settled accommodation?" - @header = "Do you know the local authority of the household’s last settled accommodation?" + @copy_key = "lettings.household_situation.previous_local_authority.previous_la_known" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." : "This is also known as the household’s ‘last settled home’." @answer_options = ANSWER_OPTIONS @conditional_for = { "prevloc" => [1] } @hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] } diff --git a/app/models/form/lettings/questions/previous_tenure.rb b/app/models/form/lettings/questions/previous_tenure.rb index a9ed5202a..360f1960a 100644 --- a/app/models/form/lettings/questions/previous_tenure.rb +++ b/app/models/form/lettings/questions/previous_tenure.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question def initialize(id, hsh, page) super @id = "prevten" - @check_answer_label = "Where was the household immediately before this letting?" - @header = "Where was the household immediately before this letting?" + @copy_key = "lettings.household_situation.prevten.not_renewal" @type = "radio" @check_answers_card_number = 0 - @hint_text = "This is where the household was the night before they moved into this new let." @answer_options = ANSWER_OPTIONS @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/previous_tenure_renewal.rb b/app/models/form/lettings/questions/previous_tenure_renewal.rb index d4849d3c2..c882eb6fe 100644 --- a/app/models/form/lettings/questions/previous_tenure_renewal.rb +++ b/app/models/form/lettings/questions/previous_tenure_renewal.rb @@ -2,12 +2,9 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question def initialize(id, hsh, page) super @id = "prevten" - @check_answer_label = "Where was the household immediately before this letting?" - @header = "Where was the household immediately before this letting?" + @copy_key = "lettings.household_situation.prevten.renewal" @type = "radio" @check_answers_card_number = 0 - @hint_text = "You told us this letting is a renewal. We have removed some options because of this.

- This is where the household was the night before they moved into this new let." @answer_options = ANSWER_OPTIONS @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/prevloc.rb b/app/models/form/lettings/questions/prevloc.rb index 7f9c0db8b..4ad7dbf11 100644 --- a/app/models/form/lettings/questions/prevloc.rb +++ b/app/models/form/lettings/questions/prevloc.rb @@ -2,12 +2,10 @@ class Form::Lettings::Questions::Prevloc < ::Form::Question def initialize(id, hsh, page) super @id = "prevloc" - @check_answer_label = "Location of household’s last settled accommodation" - @header = "Select a local authority" + @copy_key = "lettings.household_situation.previous_local_authority.prevloc" @type = "select" @inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }] @check_answers_card_number = 0 - @hint_text = "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @disable_clearing_if_not_routed_or_dynamic_answer_options = true end diff --git a/app/models/form/lettings/questions/reason.rb b/app/models/form/lettings/questions/reason.rb index 223d68634..4bc00ce43 100644 --- a/app/models/form/lettings/questions/reason.rb +++ b/app/models/form/lettings/questions/reason.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::Reason < ::Form::Question def initialize(id, hsh, page) super @id = "reason" - @check_answer_label = "Reason for leaving last settled home" - @header = "What is the tenant’s main reason for the household leaving their last settled home?" + @copy_key = "lettings.household_situation.reason.#{page.id}.reason" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously." : "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously." @conditional_for = { "reasonother" => [ 20, diff --git a/app/models/form/lettings/questions/reason_renewal.rb b/app/models/form/lettings/questions/reason_renewal.rb index 7f32b0bba..9a9ee72de 100644 --- a/app/models/form/lettings/questions/reason_renewal.rb +++ b/app/models/form/lettings/questions/reason_renewal.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question def initialize(id, hsh, page) super @id = "reason" - @check_answer_label = "Reason for leaving last settled home" - @header = "What is the tenant’s main reason for the household leaving their last settled home?" @type = "radio" + @copy_key = "lettings.household_situation.reason.#{page.id}.reason" @check_answers_card_number = 0 - @hint_text = "You told us this letting is a renewal. We have removed some options because of this." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @conditional_for = { "reasonother" => [ diff --git a/app/models/form/lettings/questions/reasonable_preference_reason.rb b/app/models/form/lettings/questions/reasonable_preference_reason.rb index 235cf6342..75b450b91 100644 --- a/app/models/form/lettings/questions/reasonable_preference_reason.rb +++ b/app/models/form/lettings/questions/reasonable_preference_reason.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question def initialize(id, hsh, page) super @id = "reasonable_preference_reason" - @check_answer_label = "Reason for reasonable preference" - @header = "Why was the household given ‘reasonable preference’?" @type = "checkbox" @check_answers_card_number = 0 - @hint_text = "Select all that apply." @answer_options = ANSWER_OPTIONS @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/reasonother.rb b/app/models/form/lettings/questions/reasonother.rb index 37bfd8c7b..7e600916b 100644 --- a/app/models/form/lettings/questions/reasonother.rb +++ b/app/models/form/lettings/questions/reasonother.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question def initialize(id, hsh, page) super @id = "reasonother" - @check_answer_label = "" - @header = "What is the reason?" + @copy_key = "lettings.household_situation.reason.#{@page.id}.reasonother" @type = "text" @check_answers_card_number = 0 - @hint_text = "" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/reasonpref.rb b/app/models/form/lettings/questions/reasonpref.rb index 522576ec6..e63f65584 100644 --- a/app/models/form/lettings/questions/reasonpref.rb +++ b/app/models/form/lettings/questions/reasonpref.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question def initialize(id, hsh, page) super @id = "reasonpref" - @check_answer_label = "Household given reasonable preference" - @header = "Was the household given ‘reasonable preference’ by the local authority?" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’." : "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority." @answer_options = ANSWER_OPTIONS @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/referral.rb b/app/models/form/lettings/questions/referral.rb index feb0082f4..904668a4b 100644 --- a/app/models/form/lettings/questions/referral.rb +++ b/app/models/form/lettings/questions/referral.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::Referral < ::Form::Question def initialize(id, hsh, page) super @id = "referral" - @check_answer_label = "Source of referral for letting" - @header = "What was the source of referral for this letting?" + @copy_key = "lettings.household_situation.referral.general_needs.la" @type = "radio" @check_answers_card_number = 0 - @hint_text = "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/referral_prp.rb b/app/models/form/lettings/questions/referral_prp.rb index 6a8fa63de..76ad3fbf8 100644 --- a/app/models/form/lettings/questions/referral_prp.rb +++ b/app/models/form/lettings/questions/referral_prp.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question def initialize(id, hsh, page) super @id = "referral" - @check_answer_label = "Source of referral for letting" - @header = "What was the source of referral for this letting?" + @copy_key = "lettings.household_situation.referral.general_needs.prp" @type = "radio" @check_answers_card_number = 0 - @hint_text = "You told us that the needs type is general needs. We have removed some options because of this." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/referral_supported_housing.rb b/app/models/form/lettings/questions/referral_supported_housing.rb index d9ede5a83..50822705e 100644 --- a/app/models/form/lettings/questions/referral_supported_housing.rb +++ b/app/models/form/lettings/questions/referral_supported_housing.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question def initialize(id, hsh, page) super @id = "referral" - @check_answer_label = "Source of referral for letting" - @header = "What was the source of referral for this letting?" + @copy_key = "lettings.household_situation.referral.supported_housing.la" @type = "radio" @check_answers_card_number = 0 - @hint_text = "You told us that you are a local authority. We have removed some options because of this." @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/referral_supported_housing_prp.rb b/app/models/form/lettings/questions/referral_supported_housing_prp.rb index ffdd7eafb..cab8fbbc9 100644 --- a/app/models/form/lettings/questions/referral_supported_housing_prp.rb +++ b/app/models/form/lettings/questions/referral_supported_housing_prp.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question def initialize(id, hsh, page) super @id = "referral" - @check_answer_label = "Source of referral for letting" - @header = "What was the source of referral for this letting?" + @copy_key = "lettings.household_situation.referral.supported_housing.prp" @type = "radio" @check_answers_card_number = 0 - @hint_text = "" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/app/models/form/lettings/questions/waityear.rb b/app/models/form/lettings/questions/waityear.rb index 94187e62b..045765951 100644 --- a/app/models/form/lettings/questions/waityear.rb +++ b/app/models/form/lettings/questions/waityear.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Waityear < ::Form::Question def initialize(id, hsh, page) super @id = "waityear" - @check_answer_label = "Length of time on local authority waiting list" - @header = form.start_year_after_2024? ? "How long has the household been on the local authority waiting list for the area of the new letting?" : "How long has the household been on the local authority waiting list for the new letting?" @type = "radio" @check_answers_card_number = 0 - @hint_text = "" @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end diff --git a/config/locales/forms/2023/lettings/household_situation.en.yml b/config/locales/forms/2023/lettings/household_situation.en.yml new file mode 100644 index 000000000..9e5e50918 --- /dev/null +++ b/config/locales/forms/2023/lettings/household_situation.en.yml @@ -0,0 +1,120 @@ +en: + forms: + 2023: + lettings: + household_situation: + layear: + page_header: "" + check_answer_label: "Length of time in local authority area" + hint_text: "" + question_text: "How long has the household continuously lived in the local authority area of the new letting?" + + waityear: + page_header: "" + check_answer_label: "Length of time on local authority waiting list" + hint_text: "" + question_text: "How long has the household been on the local authority waiting list for the new letting?" + + reason: + reason_for_leaving_last_settled_home_renewal: + page_header: "" + reason: + check_answer_label: "Reason for leaving last settled home" + hint_text: "You told us this letting is a renewal. We have removed some options because of this." + question_text: "What is the tenant’s main reason for the household leaving their last settled home?" + reasonother: + check_answer_label: "Length of time on local authority waiting list" + hint_text: "" + question_text: "How long has the household been on the local authority waiting list for the new letting?" + reason_for_leaving_last_settled_home: + page_header: "" + reason: + check_answer_label: "Reason for leaving last settled home" + hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously." + question_text: "What is the tenant’s main reason for the household leaving their last settled home?" + reasonother: + check_answer_label: "" + hint_text: "" + question_text: "What is the reason?" + + prevten: + renewal: + page_header: "" + check_answer_label: "Where was the household immediately before this letting?" + hint_text: "You told us this letting is a renewal. We have removed some options because of this.

This is where the household was the night before they moved into this new let." + question_text: "Where was the household immediately before this letting?" + not_renewal: + page_header: "" + check_answer_label: "Where was the household immediately before this letting?" + hint_text: "This is where the household was the night before they moved into this new let." + question_text: "Where was the household immediately before this letting?" + + homeless: + page_header: "" + check_answer_label: "Household homeless immediately before letting" + hint_text: "" + question_text: "Did the household experience homelessness immediately before this letting?" + + previous_postcode: + page_header: "" + ppcodenk: + check_answer_label: "" + hint_text: "This is also known as the household’s ‘last settled home’." + question_text: "Do you know the postcode of the household’s last settled accommodation?" + ppostcode_full: + check_answer_label: "Postcode of household’s last settled accommodation" + hint_text: "" + question_text: "Postcode for the previous accommodation" + + previous_local_authority: + page_header: "" + previous_la_known: + check_answer_label: "" + hint_text: "This is also known as the household’s ‘last settled home’." + question_text: "Do you know the local authority of the household’s last settled accommodation?" + prevloc: + check_answer_label: "Location of household’s last settled accommodation" + hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England." + question_text: "Select a local authority" + + reasonpref: + page_header: "" + check_answer_label: "Household given reasonable preference" + hint_text: "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority." + question_text: "Was the household given ‘reasonable preference’ by the local authority?" + + reasonable_preference_reason: + page_header: "" + check_answer_label: "Reason for reasonable preference" + hint_text: "Select all that apply." + question_text: "Why was the household given ‘reasonable preference’?" + + letting_allocation: + page_header: "" + check_answer_label: "Allocation system" + hint_text: "Select all that apply." + question_text: "How was this letting allocated?" + + referral: + supported_housing: + prp: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "" + question_text: "What was the source of referral for this letting?" + la: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that you are a local authority. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" + general_needs: + prp: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that the needs type is general needs. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" + la: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" \ No newline at end of file diff --git a/config/locales/forms/2024/lettings/household_situation.en.yml b/config/locales/forms/2024/lettings/household_situation.en.yml new file mode 100644 index 000000000..e1bf4c0ce --- /dev/null +++ b/config/locales/forms/2024/lettings/household_situation.en.yml @@ -0,0 +1,120 @@ +en: + forms: + 2024: + lettings: + household_situation: + layear: + page_header: "" + check_answer_label: "Length of time in local authority area" + hint_text: "" + question_text: "How long has the household continuously lived in the local authority area of the new letting?" + + waityear: + page_header: "" + check_answer_label: "Length of time on local authority waiting list" + hint_text: "" + question_text: "How long has the household been on the local authority waiting list for the area of the new letting?" + + reason: + reason_for_leaving_last_settled_home_renewal: + page_header: "" + reason: + check_answer_label: "Reason for leaving last settled home" + hint_text: "You told us this letting is a renewal. We have removed some options because of this." + question_text: "What is the tenant’s main reason for the household leaving their last settled home?" + reasonother: + check_answer_label: "Length of time on local authority waiting list" + hint_text: "" + question_text: "How long has the household been on the local authority waiting list for the area of the new letting?" + reason_for_leaving_last_settled_home: + page_header: "" + reason: + check_answer_label: "Reason for leaving last settled home" + hint_text: "The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously." + question_text: "What is the tenant’s main reason for the household leaving their last settled home?" + reasonother: + check_answer_label: "" + hint_text: "" + question_text: "What is the reason?" + + prevten: + renewal: + page_header: "" + check_answer_label: "Where was the household immediately before this letting?" + hint_text: "You told us this letting is a renewal. We have removed some options because of this.

This is where the household was the night before they moved into this new let." + question_text: "Where was the household immediately before this letting?" + not_renewal: + page_header: "" + check_answer_label: "Where was the household immediately before this letting?" + hint_text: "This is where the household was the night before they moved into this new let." + question_text: "Where was the household immediately before this letting?" + + homeless: + page_header: "" + check_answer_label: "Household homeless immediately before letting" + hint_text: "" + question_text: "Did the household experience homelessness immediately before this letting?" + + previous_postcode: + page_header: "" + ppcodenk: + check_answer_label: "" + hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." + question_text: "Do you know the postcode of the household’s last settled accommodation?" + ppostcode_full: + check_answer_label: "Postcode of household’s last settled accommodation" + hint_text: "" + question_text: "Postcode for the previous accommodation" + + previous_local_authority: + page_header: "" + previous_la_known: + check_answer_label: "" + hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." + question_text: "Do you know the local authority of the household’s last settled accommodation?" + prevloc: + check_answer_label: "Location of household’s last settled accommodation" + hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England." + question_text: "Select a local authority" + + reasonpref: + page_header: "" + check_answer_label: "Household given reasonable preference" + hint_text: "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’." + question_text: "Was the household given ‘reasonable preference’ by the local authority?" + + reasonable_preference_reason: + page_header: "" + check_answer_label: "Reason for reasonable preference" + hint_text: "Select all that apply." + question_text: "Why was the household given ‘reasonable preference’?" + + letting_allocation: + page_header: "" + check_answer_label: "Allocation system" + hint_text: "Select all that apply." + question_text: "How was this letting allocated?" + + referral: + supported_housing: + prp: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "" + question_text: "What was the source of referral for this letting?" + la: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that you are a local authority. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" + general_needs: + prp: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that the needs type is general needs. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" + la: + page_header: "" + check_answer_label: "Source of referral for letting" + hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this." + question_text: "What was the source of referral for this letting?" \ No newline at end of file diff --git a/spec/models/form/lettings/questions/homeless_spec.rb b/spec/models/form/lettings/questions/homeless_spec.rb index 40beb9698..f18a8ece7 100644 --- a/spec/models/form/lettings/questions/homeless_spec.rb +++ b/spec/models/form/lettings/questions/homeless_spec.rb @@ -3,7 +3,7 @@ require "rails_helper" RSpec.describe Form::Lettings::Questions::Homeless, type: :model do subject(:question) { described_class.new(nil, nil, page) } - let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) } + let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), type: "lettings"), id: "household_situation")) } it "has correct page" do expect(question.page).to eq(page) diff --git a/spec/models/form/lettings/questions/reason_renewal_spec.rb b/spec/models/form/lettings/questions/reason_renewal_spec.rb index 02abe1527..3cdff75e7 100644 --- a/spec/models/form/lettings/questions/reason_renewal_spec.rb +++ b/spec/models/form/lettings/questions/reason_renewal_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do let(:question_id) { nil } let(:question_definition) { nil } - let(:page) { instance_double(Form::Page) } + let(:page) { instance_double(Form::Page, id: "reason_renewal") } let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) } diff --git a/spec/models/form/lettings/questions/reason_spec.rb b/spec/models/form/lettings/questions/reason_spec.rb index 81fd7a5c1..0b82eca42 100644 --- a/spec/models/form/lettings/questions/reason_spec.rb +++ b/spec/models/form/lettings/questions/reason_spec.rb @@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do let(:question_id) { nil } let(:question_definition) { nil } - let(:page) { instance_double(Form::Page) } + let(:page) { instance_double(Form::Page, id: "reason") } let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }