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/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/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/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/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/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/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 aa7da5b02..1cec7b3ae 100644 --- a/app/models/form/lettings/subsections/property_information.rb +++ b/app/models/form/lettings/subsections/property_information.rb @@ -10,8 +10,8 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection @pages ||= [ uprn_questions, Form::Lettings::Pages::PropertyLocalAuthority.new(nil, nil, self), - Form::Lettings::Pages::MinRentValueCheck.new("local_authority_min_rent_value_check", nil, self, check_answers_card_number: nil), - Form::Lettings::Pages::MaxRentValueCheck.new("local_authority_max_rent_value_check", nil, self, check_answers_card_number: nil), + Form::Lettings::Pages::MinRentValueCheck.new("local_authority_min_rent_value_check", nil, self, check_answers_card_number: nil), #Soft validation + Form::Lettings::Pages::MaxRentValueCheck.new("local_authority_max_rent_value_check", nil, self, check_answers_card_number: nil), #Soft validation Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing.new(nil, nil, self), Form::Lettings::Pages::PropertyLetType.new(nil, nil, self), Form::Lettings::Pages::PropertyVacancyReasonNotFirstLet.new(nil, nil, self), @@ -21,12 +21,12 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection Form::Lettings::Pages::PropertyBuildingType.new(nil, nil, self), Form::Lettings::Pages::PropertyWheelchairAccessible.new(nil, nil, self), Form::Lettings::Pages::PropertyNumberOfBedrooms.new(nil, nil, self), - Form::Lettings::Pages::MinRentValueCheck.new("beds_min_rent_value_check", nil, self, check_answers_card_number: 0), - Form::Lettings::Pages::MaxRentValueCheck.new("beds_max_rent_value_check", nil, self, check_answers_card_number: 0), + Form::Lettings::Pages::MinRentValueCheck.new("beds_min_rent_value_check", nil, self, check_answers_card_number: 0), #Soft validation + Form::Lettings::Pages::MaxRentValueCheck.new("beds_max_rent_value_check", nil, self, check_answers_card_number: 0), #Soft validation Form::Lettings::Pages::VoidDate.new(nil, nil, self), - Form::Lettings::Pages::VoidDateValueCheck.new(nil, nil, self), + Form::Lettings::Pages::VoidDateValueCheck.new(nil, nil, self), #Soft validation Form::Lettings::Pages::PropertyMajorRepairs.new(nil, nil, self), - Form::Lettings::Pages::PropertyMajorRepairsValueCheck.new(nil, nil, self), + Form::Lettings::Pages::PropertyMajorRepairsValueCheck.new(nil, nil, self), #Soft validation ].flatten.compact end diff --git a/config/locales/en.yml b/config/locales/en.yml index faced2c11..33f501e65 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -234,7 +234,7 @@ en: scheme_deleted: "%{service_name} has been deleted." user_deleted: "%{name} has been deleted." organisation_deleted: "%{name} has been deleted." - user_updated: + user_updated: self: "Your account details have been updated." other: "%{name}’s details have been updated." @@ -828,7 +828,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: @@ -841,7 +840,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: @@ -850,7 +848,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 index 4d0480739..fa23a3c9f 100644 --- a/config/locales/forms/2023/lettings/property_information.en.yml +++ b/config/locales/forms/2023/lettings/property_information.en.yml @@ -49,13 +49,31 @@ en: hint_text: "" question_text: "What is the property’s local authority?" - beds: + first_time_property_let_as_social_housing: page_header: "" - check_answer_label: "Number of bedrooms" - hint_text: "A bedsit has 1 bedroom." - question_text: "How many bedrooms does the property have?" + 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?" - proptype: + 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: "" @@ -72,3 +90,15 @@ en: 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/2024/lettings/property_information.en.yml b/config/locales/forms/2024/lettings/property_information.en.yml index 368304c8c..f89795995 100644 --- a/config/locales/forms/2024/lettings/property_information.en.yml +++ b/config/locales/forms/2024/lettings/property_information.en.yml @@ -66,13 +66,25 @@ en: hint_text: "" question_text: "What is the property’s local authority?" - beds: + first_time_property_let_as_social_housing: page_header: "" - check_answer_label: "Number of bedrooms" - hint_text: "A bedsit has 1 bedroom." - question_text: "How many bedrooms does the property have?" + 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: "This is the rent type of the previous tenancy in this property." + question_text: "What type was the property most recently let as?" - proptype: + 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: "" @@ -87,6 +99,28 @@ en: wchair: page_header: "" check_answer_label: "Property built or adapted to wheelchair-user standards" - hint_text: "" + 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?"