From 47928f384295e629dcb1d8b67074bb97b2d84d8f Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:09:37 +0000 Subject: [PATCH] CLDC-3680: Copy changes lettings property information questions (#2726) --- app/models/form/lettings/pages/address.rb | 2 +- .../form/lettings/pages/address_fallback.rb | 2 +- .../form/lettings/pages/address_matcher.rb | 2 +- .../lettings/pages/property_major_repairs.rb | 1 + app/models/form/lettings/pages/uprn.rb | 1 + .../form/lettings/pages/uprn_selection.rb | 1 - app/models/form/lettings/pages/void_date.rb | 1 - .../form/lettings/questions/address_line1.rb | 3 +- .../address_line1_for_address_matcher.rb | 3 +- .../form/lettings/questions/address_line2.rb | 2 +- app/models/form/lettings/questions/beds.rb | 6 - .../form/lettings/questions/builtype.rb | 3 - app/models/form/lettings/questions/county.rb | 3 +- ...rst_time_property_let_as_social_housing.rb | 3 - app/models/form/lettings/questions/la.rb | 2 - .../form/lettings/questions/majorrepairs.rb | 4 +- app/models/form/lettings/questions/mrcdate.rb | 3 +- app/models/form/lettings/questions/offered.rb | 2 - .../questions/postcode_for_address_matcher.rb | 2 +- .../questions/postcode_for_full_address.rb | 3 +- .../lettings/questions/previous_let_type.rb | 3 - app/models/form/lettings/questions/rsnvac.rb | 3 - .../lettings/questions/rsnvac_first_let.rb | 3 - .../form/lettings/questions/town_or_city.rb | 3 +- .../form/lettings/questions/unittype_gn.rb | 3 - app/models/form/lettings/questions/uprn.rb | 3 +- .../form/lettings/questions/uprn_known.rb | 6 +- .../form/lettings/questions/uprn_selection.rb | 2 - .../form/lettings/questions/voiddate.rb | 2 - .../form/lettings/questions/wheelchair.rb | 3 - .../subsections/property_information.rb | 2 +- config/locales/en.yml | 3 - .../2023/lettings/property_information.en.yml | 104 ++++++++++++++ .../forms/2023/sales/soft_validations.en.yml | 7 + .../2024/lettings/property_information.en.yml | 127 ++++++++++++++++++ .../duplicate_logs_controller_spec.rb | 7 - 36 files changed, 255 insertions(+), 75 deletions(-) create mode 100644 config/locales/forms/2023/lettings/property_information.en.yml create mode 100644 config/locales/forms/2024/lettings/property_information.en.yml diff --git a/app/models/form/lettings/pages/address.rb b/app/models/form/lettings/pages/address.rb index 9fe18d3ef..eadda7f46 100644 --- a/app/models/form/lettings/pages/address.rb +++ b/app/models/form/lettings/pages/address.rb @@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page def initialize(id, hsh, subsection) super @id = "address" - @header = "Q#{QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]} - What is the property's address?" + @copy_key = "lettings.property_information.address" @depends_on = [ { "is_supported_housing?" => false, "uprn_known" => nil }, { "is_supported_housing?" => false, "uprn_known" => 0 }, diff --git a/app/models/form/lettings/pages/address_fallback.rb b/app/models/form/lettings/pages/address_fallback.rb index 67f8ef5b1..2d5249671 100644 --- a/app/models/form/lettings/pages/address_fallback.rb +++ b/app/models/form/lettings/pages/address_fallback.rb @@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressFallback < ::Form::Page def initialize(id, hsh, subsection) super @id = "address" - @header = "Q12 - What is the property's address?" + @copy_key = "lettings.property_information.address" @depends_on = [ { "is_supported_housing?" => false, "uprn_known" => nil, "uprn_selection" => "uprn_not_listed" }, { "is_supported_housing?" => false, "uprn_known" => 0, "uprn_selection" => "uprn_not_listed" }, diff --git a/app/models/form/lettings/pages/address_matcher.rb b/app/models/form/lettings/pages/address_matcher.rb index 859e31077..b1fc885be 100644 --- a/app/models/form/lettings/pages/address_matcher.rb +++ b/app/models/form/lettings/pages/address_matcher.rb @@ -2,7 +2,7 @@ class Form::Lettings::Pages::AddressMatcher < ::Form::Page def initialize(id, hsh, subsection) super @id = "address_matcher" - @header = "Find an address" + @copy_key = "lettings.property_information.address_matcher" @depends_on = [ { "is_supported_housing?" => false, "uprn_known" => nil }, { "is_supported_housing?" => false, "uprn_known" => 0 }, diff --git a/app/models/form/lettings/pages/property_major_repairs.rb b/app/models/form/lettings/pages/property_major_repairs.rb index 985b5dce1..92bbadc0b 100644 --- a/app/models/form/lettings/pages/property_major_repairs.rb +++ b/app/models/form/lettings/pages/property_major_repairs.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::PropertyMajorRepairs < ::Form::Page def initialize(id, hsh, subsection) super @id = "property_major_repairs" + @copy_key = "lettings.property_information.property_major_repairs" @depends_on = [{ "is_renewal?" => false, "vacancy_reason_not_renewal_or_first_let?" => true }] end diff --git a/app/models/form/lettings/pages/uprn.rb b/app/models/form/lettings/pages/uprn.rb index d3c744b8f..474928eb3 100644 --- a/app/models/form/lettings/pages/uprn.rb +++ b/app/models/form/lettings/pages/uprn.rb @@ -2,6 +2,7 @@ class Form::Lettings::Pages::Uprn < ::Form::Page def initialize(id, hsh, subsection) super @id = "uprn" + @copy_key = "lettings.property_information.uprn" @depends_on = [{ "is_supported_housing?" => false }] end diff --git a/app/models/form/lettings/pages/uprn_selection.rb b/app/models/form/lettings/pages/uprn_selection.rb index 4c7ca4ae1..96bfe68e8 100644 --- a/app/models/form/lettings/pages/uprn_selection.rb +++ b/app/models/form/lettings/pages/uprn_selection.rb @@ -2,7 +2,6 @@ class Form::Lettings::Pages::UprnSelection < ::Form::Page def initialize(id, hsh, subsection) super @id = "uprn_selection" - @header = "We found some addresses that might be this property" @depends_on = [ { "is_supported_housing?" => false, "uprn_known" => nil, "address_options_present?" => true }, { "is_supported_housing?" => false, "uprn_known" => 0, "address_options_present?" => true }, diff --git a/app/models/form/lettings/pages/void_date.rb b/app/models/form/lettings/pages/void_date.rb index 2187ebe57..5ba80d41e 100644 --- a/app/models/form/lettings/pages/void_date.rb +++ b/app/models/form/lettings/pages/void_date.rb @@ -2,7 +2,6 @@ class Form::Lettings::Pages::VoidDate < ::Form::Page def initialize(id, hsh, subsection) super @id = "void_date" - @header = "Void date" @depends_on = [{ "is_renewal?" => false }] end diff --git a/app/models/form/lettings/questions/address_line1.rb b/app/models/form/lettings/questions/address_line1.rb index f90da8b26..7da9720eb 100644 --- a/app/models/form/lettings/questions/address_line1.rb +++ b/app/models/form/lettings/questions/address_line1.rb @@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question def initialize(id, hsh, page) super @id = "address_line1" - @header = "Address line 1" + @copy_key = "lettings.property_information.address.address_line1" @error_label = "Address line 1" @type = "text" @plain_label = true - @check_answer_label = "Address lines 1 and 2" @disable_clearing_if_not_routed_or_dynamic_answer_options = true @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @hide_question_number_on_page = true diff --git a/app/models/form/lettings/questions/address_line1_for_address_matcher.rb b/app/models/form/lettings/questions/address_line1_for_address_matcher.rb index b2247a8f0..0e8f59da3 100644 --- a/app/models/form/lettings/questions/address_line1_for_address_matcher.rb +++ b/app/models/form/lettings/questions/address_line1_for_address_matcher.rb @@ -2,11 +2,10 @@ class Form::Lettings::Questions::AddressLine1ForAddressMatcher < ::Form::Questio def initialize(id, hsh, page) super @id = "address_line1_input" - @header = "Address line 1" + @copy_key = "lettings.property_information.address_matcher.address_line1_input" @error_label = "Address line 1" @type = "text" @plain_label = true - @check_answer_label = "Find address" @disable_clearing_if_not_routed_or_dynamic_answer_options = true @hide_question_number_on_page = true end diff --git a/app/models/form/lettings/questions/address_line2.rb b/app/models/form/lettings/questions/address_line2.rb index 3b2c36dbc..0d4d2a705 100644 --- a/app/models/form/lettings/questions/address_line2.rb +++ b/app/models/form/lettings/questions/address_line2.rb @@ -2,7 +2,7 @@ class Form::Lettings::Questions::AddressLine2 < ::Form::Question def initialize(id, hsh, page) super @id = "address_line2" - @header = "Address line 2 (optional)" + @copy_key = "lettings.property_information.address.address_line2" @type = "text" @plain_label = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true diff --git a/app/models/form/lettings/questions/beds.rb b/app/models/form/lettings/questions/beds.rb index 8c0399a61..4661f5367 100644 --- a/app/models/form/lettings/questions/beds.rb +++ b/app/models/form/lettings/questions/beds.rb @@ -2,8 +2,6 @@ class Form::Lettings::Questions::Beds < ::Form::Question def initialize(id, hsh, page) super @id = "beds" - @check_answer_label = "Number of bedrooms" - @header = "How many bedrooms does the property have?" @type = "numeric" @width = 2 @check_answers_card_number = 0 @@ -17,9 +15,5 @@ class Form::Lettings::Questions::Beds < ::Form::Question log.is_bedsit? end - def hint_text - form.start_year_after_2024? ? "If shared accommodation, enter the number of bedrooms occupied by this household." : "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom." - end - QUESTION_NUMBER_FROM_YEAR = { 2023 => 22 }.freeze end diff --git a/app/models/form/lettings/questions/builtype.rb b/app/models/form/lettings/questions/builtype.rb index a95d88b13..7df3c46dd 100644 --- a/app/models/form/lettings/questions/builtype.rb +++ b/app/models/form/lettings/questions/builtype.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Builtype < ::Form::Question def initialize(id, hsh, page) super @id = "builtype" - @check_answer_label = "Type of building" - @header = "What type of building is the property?" @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/county.rb b/app/models/form/lettings/questions/county.rb index f3c780257..27e17645e 100644 --- a/app/models/form/lettings/questions/county.rb +++ b/app/models/form/lettings/questions/county.rb @@ -2,10 +2,9 @@ class Form::Lettings::Questions::County < ::Form::Question def initialize(id, hsh, page) super @id = "county" - @header = "County (optional)" + @copy_key = "lettings.property_information.address.county" @type = "text" @plain_label = true - @check_answer_label = "County" @disable_clearing_if_not_routed_or_dynamic_answer_options = true @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @hide_question_number_on_page = true diff --git a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb index 6e36c9911..9d54cfcb3 100644 --- a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb +++ b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q def initialize(id, hsh, page) super @id = "first_time_property_let_as_social_housing" - @check_answer_label = "First time being let as social-housing?" - @header = "Is this the first time the property has been let as social housing?" @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/la.rb b/app/models/form/lettings/questions/la.rb index 6038bc2ad..5e1c8ae2b 100644 --- a/app/models/form/lettings/questions/la.rb +++ b/app/models/form/lettings/questions/la.rb @@ -2,8 +2,6 @@ class Form::Lettings::Questions::La < ::Form::Question def initialize(id, hsh, page) super @id = "la" - @check_answer_label = "Local Authority" - @header = "What is the property’s local authority?" @type = "select" @check_answers_card_number = nil @hint_text = "" diff --git a/app/models/form/lettings/questions/majorrepairs.rb b/app/models/form/lettings/questions/majorrepairs.rb index d2d94224e..ef33c1e01 100644 --- a/app/models/form/lettings/questions/majorrepairs.rb +++ b/app/models/form/lettings/questions/majorrepairs.rb @@ -2,11 +2,9 @@ class Form::Lettings::Questions::Majorrepairs < ::Form::Question def initialize(id, hsh, page) super @id = "majorrepairs" - @check_answer_label = "Major repairs carried out during void period" - @header = "Were any major repairs carried out during the void period?" + @copy_key = "lettings.property_information.property_major_repairs.majorrepairs" @type = "radio" @check_answers_card_number = 0 - @hint_text = "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs." @answer_options = ANSWER_OPTIONS @conditional_for = { "mrcdate" => [1] } @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/lettings/questions/mrcdate.rb b/app/models/form/lettings/questions/mrcdate.rb index 8bbd8223b..33c8f2c5f 100644 --- a/app/models/form/lettings/questions/mrcdate.rb +++ b/app/models/form/lettings/questions/mrcdate.rb @@ -2,8 +2,7 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question def initialize(id, hsh, page) super @id = "mrcdate" - @check_answer_label = "Completion date of repairs" - @header = "When were the repairs completed?" + @copy_key = "lettings.property_information.property_major_repairs.mrcdate" @type = "date" @check_answers_card_number = 0 @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/lettings/questions/offered.rb b/app/models/form/lettings/questions/offered.rb index 6d98f405c..701a6f737 100644 --- a/app/models/form/lettings/questions/offered.rb +++ b/app/models/form/lettings/questions/offered.rb @@ -2,8 +2,6 @@ class Form::Lettings::Questions::Offered < ::Form::Question def initialize(id, hsh, page) super @id = "offered" - @check_answer_label = I18n.t("check_answer_labels.offered") - @header = I18n.t("questions.offered") @type = "numeric" @width = 2 @check_answers_card_number = 0 diff --git a/app/models/form/lettings/questions/postcode_for_address_matcher.rb b/app/models/form/lettings/questions/postcode_for_address_matcher.rb index 2cac3ce92..9a7751904 100644 --- a/app/models/form/lettings/questions/postcode_for_address_matcher.rb +++ b/app/models/form/lettings/questions/postcode_for_address_matcher.rb @@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForAddressMatcher < ::Form::Question def initialize(id, hsh, page) super @id = "postcode_full_input" - @header = "Postcode" + @copy_key = "lettings.property_information.address_matcher.postcode_full_input" @type = "text" @width = 5 @plain_label = true diff --git a/app/models/form/lettings/questions/postcode_for_full_address.rb b/app/models/form/lettings/questions/postcode_for_full_address.rb index ef93b003d..d6ee9859f 100644 --- a/app/models/form/lettings/questions/postcode_for_full_address.rb +++ b/app/models/form/lettings/questions/postcode_for_full_address.rb @@ -2,7 +2,7 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question def initialize(id, hsh, page) super @id = "postcode_full" - @header = "Postcode" + @copy_key = "lettings.property_information.address.postcode_full" @type = "text" @width = 5 @inferred_check_answers_value = [{ @@ -17,7 +17,6 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question }, } @plain_label = true - @check_answer_label = "Postcode" @disable_clearing_if_not_routed_or_dynamic_answer_options = true @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @hide_question_number_on_page = true diff --git a/app/models/form/lettings/questions/previous_let_type.rb b/app/models/form/lettings/questions/previous_let_type.rb index d9c018820..577571571 100644 --- a/app/models/form/lettings/questions/previous_let_type.rb +++ b/app/models/form/lettings/questions/previous_let_type.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question def initialize(id, hsh, page) super @id = "unitletas" - @check_answer_label = "Most recent let type" - @header = "What type was the property most recently let as?" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "This is the rent type of the previous tenancy in this property." : "" @answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : 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/rsnvac.rb b/app/models/form/lettings/questions/rsnvac.rb index 303f2ea48..935980712 100644 --- a/app/models/form/lettings/questions/rsnvac.rb +++ b/app/models/form/lettings/questions/rsnvac.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question def initialize(id, hsh, page) super @id = "rsnvac" - @check_answer_label = "Vacancy reason" - @header = "What is the reason for the property being vacant?" @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/rsnvac_first_let.rb b/app/models/form/lettings/questions/rsnvac_first_let.rb index f03c64995..4b87d059f 100644 --- a/app/models/form/lettings/questions/rsnvac_first_let.rb +++ b/app/models/form/lettings/questions/rsnvac_first_let.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question def initialize(id, hsh, page) super @id = "rsnvac" - @check_answer_label = "Vacancy reason" - @header = "What is the reason for the property being vacant?" @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/town_or_city.rb b/app/models/form/lettings/questions/town_or_city.rb index 745810893..14ed19dfc 100644 --- a/app/models/form/lettings/questions/town_or_city.rb +++ b/app/models/form/lettings/questions/town_or_city.rb @@ -2,10 +2,9 @@ class Form::Lettings::Questions::TownOrCity < ::Form::Question def initialize(id, hsh, page) super @id = "town_or_city" - @header = "Town or city" + @copy_key = "lettings.property_information.address.town_or_city" @type = "text" @plain_label = true - @check_answer_label = "Town or city" @disable_clearing_if_not_routed_or_dynamic_answer_options = true @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @hide_question_number_on_page = true diff --git a/app/models/form/lettings/questions/unittype_gn.rb b/app/models/form/lettings/questions/unittype_gn.rb index 501f25ee7..95a199b98 100644 --- a/app/models/form/lettings/questions/unittype_gn.rb +++ b/app/models/form/lettings/questions/unittype_gn.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::UnittypeGn < ::Form::Question def initialize(id, hsh, page) super @id = "unittype_gn" - @check_answer_label = "Type of unit" - @header = "What type of unit is the property?" @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/uprn.rb b/app/models/form/lettings/questions/uprn.rb index 7c860e01b..53df6bcf2 100644 --- a/app/models/form/lettings/questions/uprn.rb +++ b/app/models/form/lettings/questions/uprn.rb @@ -2,8 +2,7 @@ class Form::Lettings::Questions::Uprn < ::Form::Question def initialize(id, hsh, page) super @id = "uprn" - @check_answer_label = "UPRN" - @header = "What is the property's UPRN?" + @copy_key = "lettings.property_information.uprn.uprn" @type = "text" @width = 10 @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/lettings/questions/uprn_known.rb b/app/models/form/lettings/questions/uprn_known.rb index a9840667c..29d415134 100644 --- a/app/models/form/lettings/questions/uprn_known.rb +++ b/app/models/form/lettings/questions/uprn_known.rb @@ -2,13 +2,9 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question def initialize(id, hsh, page) super @id = "uprn_known" - @check_answer_label = "UPRN known?" - @header = "Do you know the property's UPRN?" + @copy_key = "lettings.property_information.uprn.uprn_known" @type = "radio" @answer_options = ANSWER_OPTIONS - @hint_text = "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

- The UPRN may not be the same as the property reference assigned by your organisation.

- If you don’t know the UPRN you can enter the address of the property instead on the next screen." @conditional_for = { "uprn" => [1] } @inferred_check_answers_value = [ { diff --git a/app/models/form/lettings/questions/uprn_selection.rb b/app/models/form/lettings/questions/uprn_selection.rb index f6c71f498..90fa319b7 100644 --- a/app/models/form/lettings/questions/uprn_selection.rb +++ b/app/models/form/lettings/questions/uprn_selection.rb @@ -2,9 +2,7 @@ class Form::Lettings::Questions::UprnSelection < ::Form::Question def initialize(id, hsh, page) super @id = "uprn_selection" - @header = "Select the correct address" @type = "radio" - @check_answer_label = "Select the correct address" @disable_clearing_if_not_routed_or_dynamic_answer_options = true end diff --git a/app/models/form/lettings/questions/voiddate.rb b/app/models/form/lettings/questions/voiddate.rb index 9d47fe1ea..1f5d2317a 100644 --- a/app/models/form/lettings/questions/voiddate.rb +++ b/app/models/form/lettings/questions/voiddate.rb @@ -2,8 +2,6 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question def initialize(id, hsh, page) super @id = "voiddate" - @check_answer_label = "Void date" - @header = "What is the void date?" @type = "date" @check_answers_card_number = 0 @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] diff --git a/app/models/form/lettings/questions/wheelchair.rb b/app/models/form/lettings/questions/wheelchair.rb index 7d8dcfa25..f766a0e44 100644 --- a/app/models/form/lettings/questions/wheelchair.rb +++ b/app/models/form/lettings/questions/wheelchair.rb @@ -2,11 +2,8 @@ class Form::Lettings::Questions::Wheelchair < ::Form::Question def initialize(id, hsh, page) super @id = "wchair" - @check_answer_label = "Property built or adapted to wheelchair-user standards" - @header = "Is the property built or adapted to wheelchair-user standards?" @type = "radio" @check_answers_card_number = 0 - @hint_text = form.start_year_after_2024? ? "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property." : "" @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/subsections/property_information.rb b/app/models/form/lettings/subsections/property_information.rb index 7b9aead2d..fa2ff0efa 100644 --- a/app/models/form/lettings/subsections/property_information.rb +++ b/app/models/form/lettings/subsections/property_information.rb @@ -34,7 +34,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection Form::Lettings::Pages::Uprn.new(nil, nil, self), Form::Lettings::Pages::UprnConfirmation.new(nil, nil, self), Form::Lettings::Pages::AddressMatcher.new(nil, nil, self), - Form::Lettings::Pages::NoAddressFound.new(nil, nil, self), + Form::Lettings::Pages::NoAddressFound.new(nil, nil, self), # soft validation Form::Lettings::Pages::UprnSelection.new(nil, nil, self), Form::Lettings::Pages::AddressFallback.new(nil, nil, self), ] diff --git a/config/locales/en.yml b/config/locales/en.yml index 5baa98338..c78ba2463 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -741,7 +741,6 @@ Make sure these answers are correct." stairowned: one: "What percentage of the property does the buyer now own in total?" other: "What percentage of the property do the buyers now own in total?" - offered: "How many times was the property offered between becoming vacant and this letting?" hints: location: @@ -754,7 +753,6 @@ Make sure these answers are correct." toggle_active: "If the date is before %{date}, select ‘From the start of the open collection period’ because the previous period has now closed." bulk_upload: needstype: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes." - offered: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0." check_answer_labels: soctenant: @@ -763,7 +761,6 @@ Make sure these answers are correct." stairowned: one: "Percentage the buyer now owns in total." other: "Percentage the buyers now own in total." - offered: "Times previously offered since becoming available." warnings: organisation: diff --git a/config/locales/forms/2023/lettings/property_information.en.yml b/config/locales/forms/2023/lettings/property_information.en.yml new file mode 100644 index 000000000..f1b652935 --- /dev/null +++ b/config/locales/forms/2023/lettings/property_information.en.yml @@ -0,0 +1,104 @@ +en: + forms: + 2023: + lettings: + property_information: + uprn: + page_header: "" + uprn_known: + check_answer_label: "UPRN known?" + hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

The UPRN may not be the same as the property reference assigned by your organisation.

If you don’t know the UPRN you can enter the address of the property instead on the next screen." + question_text: "Do you know the property's UPRN?" + uprn: + check_answer_label: "UPRN" + hint_text: "" + question_text: "What is the property's UPRN?" + + uprn_confirmed: + page_header: "We found an address that might be this property" + check_answer_label: "Is this the right address?" + hint_text: "" + question_text: "Is this the property address?" + + address: + page_header: "Q12 - What is the property's address?" + address_line1: + check_answer_label: "Address lines 1 and 2" + hint_text: "" + question_text: "Address line 1" + address_line2: + check_answer_label: "" + hint_text: "" + question_text: "Address line 2 (optional)" + town_or_city: + check_answer_label: "Town or city" + hint_text: "" + question_text: "Town or city" + county: + check_answer_label: "County" + hint_text: "" + question_text: "County (optional)" + postcode_full: + check_answer_label: "Postcode" + hint_text: "" + question_text: "Postcode" + + la: + page_header: "" + check_answer_label: "Local authority" + hint_text: "" + question_text: "What is the property’s local authority?" + + first_time_property_let_as_social_housing: + page_header: "" + check_answer_label: "First time being let as social-housing?" + hint_text: "" + question_text: "Is this the first time the property has been let as social housing?" + + unitletas: + page_header: "" + check_answer_label: "Most recent let type" + hint_text: "" + question_text: "What type was the property most recently let as?" + + rsnvac: + page_header: "" + check_answer_label: "Vacancy reason" + hint_text: "" + question_text: "What is the reason for the property being vacant?" + + offered: + page_header: "" + check_answer_label: "Times previously offered since becoming available." + hint_text: "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0." + question_text: "How many times was the property offered between becoming vacant and this letting?" + + unittype_gn: + page_header: "" + check_answer_label: "Type of unit" + hint_text: "" + question_text: "What type of unit is the property?" + + builtype: + page_header: "" + check_answer_label: "Type of building" + hint_text: "" + question_text: "What type of building is the property?" + + wchair: + page_header: "" + check_answer_label: "Property built or adapted to wheelchair-user standards" + hint_text: "" + question_text: "Is the property built or adapted to wheelchair-user standards?" + + beds: + page_header: "" + check_answer_label: "Number of bedrooms" + hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom." + question_text: "How many bedrooms does the property have?" + + voiddate: + page_header: "Void date" + check_answer_label: "Void date" + hint_text: "" + question_text: "What is the void date?" diff --git a/config/locales/forms/2023/sales/soft_validations.en.yml b/config/locales/forms/2023/sales/soft_validations.en.yml index 11a7406e4..1c3cd4955 100644 --- a/config/locales/forms/2023/sales/soft_validations.en.yml +++ b/config/locales/forms/2023/sales/soft_validations.en.yml @@ -18,6 +18,7 @@ en: question_text: "Are you sure this person is retired?" title_text: "You told us this person is aged %{age} years and retired." informative_text: "The minimum expected retirement age in England is 66." + old_persons_shared_ownership_value_check: page_header: "" check_answer_label: "Shared ownership confirmation" @@ -27,6 +28,7 @@ en: joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme." not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme." informative_text: "At least one buyer must be aged 65 years and over to use this scheme." + income1_value_check: check_answer_label: "Buyer 1 income confirmation" hint_text: "" @@ -113,12 +115,14 @@ en: not_joint_purchase: title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." + wheel_value_check: page_header: "" check_answer_label: "Does anyone in the household use a wheelchair?" hint_text: "" question_text: "You told us that someone in the household uses a wheelchair." title_text: "You told us that someone in the household uses a wheelchair." + buyer_livein_value_check: buyer1: page_header: "" @@ -134,6 +138,7 @@ en: question_text: "Are you sure this is correct?" title_text: "You told us that buyer 2 will not live in the property." informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property." + student_not_child_value_check: page_header: "" check_answer_label: "Student not a child confirmation" @@ -141,6 +146,7 @@ en: question_text: "Are you sure this person is not a child?" title_text: "You told us this person is a student aged between 16 and 19." informative_text: "Are you sure this person is not a child?" + partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" @@ -148,6 +154,7 @@ en: question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." informative_text: "Are you sure this is correct?" + multiple_partners_value_check: page_header: "" check_answer_label: "Multiple partners confirmation" diff --git a/config/locales/forms/2024/lettings/property_information.en.yml b/config/locales/forms/2024/lettings/property_information.en.yml new file mode 100644 index 000000000..012ff0e0d --- /dev/null +++ b/config/locales/forms/2024/lettings/property_information.en.yml @@ -0,0 +1,127 @@ +en: + forms: + 2024: + lettings: + property_information: + first_time_property_let_as_social_housing: + page_header: "" + check_answer_label: "First time being let as social-housing?" + hint_text: "" + question_text: "Is this the first time the property has been let as social housing?" + + uprn: + page_header: "" + uprn_known: + check_answer_label: "UPRN known?" + hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

The UPRN may not be the same as the property reference assigned by your organisation.

If you don’t know the UPRN you can enter the address of the property instead on the next screen." + question_text: "Do you know the property's UPRN?" + uprn: + check_answer_label: "UPRN" + hint_text: "" + question_text: "What is the property's UPRN?" + + uprn_confirmed: + page_header: "We found an address that might be this property" + check_answer_label: "Is this the right address?" + hint_text: "" + question_text: "Is this the property address?" + + address_matcher: + page_header: "Find an address" + address_line1_input: + check_answer_label: "Find address" + hint_text: "" + question_text: "Address line 1" + postcode_full_input: + check_answer_label: "" + hint_text: "" + question_text: "Postcode" + + uprn_selection: + page_header: "We found an address that might be this property" + check_answer_label: "Select the correct address" + hint_text: "" + question_text: "Select the correct address" + + address: + page_header: "Q12 - What is the property's address?" + address_line1: + check_answer_label: "Address lines 1 and 2" + hint_text: "" + question_text: "Address line 1" + address_line2: + check_answer_label: "" + hint_text: "" + question_text: "Address line 2 (optional)" + town_or_city: + check_answer_label: "Town or city" + hint_text: "" + question_text: "Town or city" + county: + check_answer_label: "County" + hint_text: "" + question_text: "County (optional)" + postcode_full: + check_answer_label: "Postcode" + hint_text: "" + question_text: "Postcode" + + la: + page_header: "" + check_answer_label: "Local authority" + hint_text: "" + question_text: "What is the property’s local authority?" + + + unitletas: + page_header: "" + check_answer_label: "Most recent let type" + hint_text: "This is the rent type of the previous tenancy in this property." + question_text: "What type was the property most recently let as?" + + rsnvac: + page_header: "" + check_answer_label: "Vacancy reason" + hint_text: "" + question_text: "What is the reason for the property being vacant?" + + unittype_gn: + page_header: "" + check_answer_label: "Type of unit" + hint_text: "" + question_text: "What type of unit is the property?" + + builtype: + page_header: "" + check_answer_label: "Type of building" + hint_text: "" + question_text: "What type of building is the property?" + + wchair: + page_header: "" + check_answer_label: "Property built or adapted to wheelchair-user standards" + hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property." + question_text: "Is the property built or adapted to wheelchair-user standards?" + + beds: + page_header: "" + check_answer_label: "Number of bedrooms" + hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household." + question_text: "How many bedrooms does the property have?" + + voiddate: + page_header: "Void date" + check_answer_label: "Void date" + hint_text: "" + question_text: "What is the void date?" + + property_major_repairs: + page_header: "" + majorrepairs: + check_answer_label: "Major repairs carried out during void period" + hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs." + question_text: "Were any major repairs carried out during the void period?" + mrcdate: + check_answer_label: "Completion date of repairs" + hint_text: "" + question_text: "When were the repairs completed?" diff --git a/spec/requests/duplicate_logs_controller_spec.rb b/spec/requests/duplicate_logs_controller_spec.rb index c06d30baf..700964fcf 100644 --- a/spec/requests/duplicate_logs_controller_spec.rb +++ b/spec/requests/duplicate_logs_controller_spec.rb @@ -66,7 +66,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3) - expect(page).to have_content("Q12 - Postcode", count: 3) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3) @@ -84,7 +83,6 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3) - expect(page).to have_content("Q12 - Postcode", count: 1) expect(page).to have_content("Postcode (from UPRN)", count: 2) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) @@ -114,7 +112,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1) - expect(page).to have_content("Q12 - Postcode", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) @@ -141,7 +138,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1) - expect(page).to have_content("Q12 - Postcode", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) @@ -295,7 +291,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 3) expect(page).to have_content("Q7 - Tenant code", count: 3) - expect(page).to have_content("Q12 - Postcode", count: 3) expect(page).to have_content("Q32 - Lead tenant’s age", count: 3) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 3) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 3) @@ -324,7 +319,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1) - expect(page).to have_content("Q12 - Postcode", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1) @@ -351,7 +345,6 @@ RSpec.describe DuplicateLogsController, type: :request do it "displays check your answers for each log with correct questions" do expect(page).to have_content("Q5 - Tenancy start date", count: 1) expect(page).to have_content("Q7 - Tenant code", count: 1) - expect(page).to have_content("Q12 - Postcode", count: 1) expect(page).to have_content("Q32 - Lead tenant’s age", count: 1) expect(page).to have_content("Q33 - Lead tenant’s gender identity", count: 1) expect(page).to have_content("Q37 - Lead tenant’s working situation", count: 1)