From 625b0c757c70dcb8b212386a31083d259feb6eed Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:29:55 +0000 Subject: [PATCH 1/3] CLDC-3668 Extract guidance copy (#2737) * Extract guidance copy * Update tests and lint --- .../form/lettings/questions/declaration.rb | 2 +- .../form/lettings/questions/rent_type.rb | 2 +- .../form/sales/questions/privacy_notice.rb | 6 +- .../sales/questions/shared_ownership_type.rb | 10 +-- ..._discounted_ownership_type_definitions.erb | 28 ++------- app/views/form/guidance/_finding_location.erb | 10 +-- app/views/form/guidance/_finding_scheme.erb | 13 ++-- .../form/guidance/_mortgage_lender.html.erb | 8 +-- .../_outright_sale_type_definitions.erb | 13 ++-- .../form/guidance/_privacy_notice_buyer.erb | 4 +- .../guidance/_privacy_notice_buyer_2024.erb | 1 - ...ivacy_notice_buyer_2024_joint_purchase.erb | 1 - .../_privacy_notice_buyer_joint_purchase.erb | 4 +- .../form/guidance/_privacy_notice_tenant.erb | 4 +- .../guidance/_privacy_notice_tenant_2024.erb | 1 - .../form/guidance/_rent_type_definitions.erb | 26 ++------ .../guidance/_rent_type_definitions_2024.erb | 21 ------- .../form/guidance/_scheme_selection.html.erb | 4 +- .../_shared_ownership_type_definitions.erb | 31 ++------- ...shared_ownership_type_definitions_2024.erb | 26 -------- app/views/form/guidance/_void_date.html.erb | 14 ++--- .../guidance/_what_counts_as_income.html.erb | 21 ++----- .../forms/2023/lettings/guidance.en.yml | 63 +++++++++++++++++++ .../locales/forms/2023/sales/guidance.en.yml | 47 ++++++++++++++ .../forms/2024/lettings/guidance.en.yml | 63 +++++++++++++++++++ .../locales/forms/2024/sales/guidance.en.yml | 46 ++++++++++++++ .../lettings/questions/declaration_spec.rb | 2 +- .../form/lettings/questions/rent_type_spec.rb | 2 +- .../sales/questions/privacy_notice_spec.rb | 4 +- .../questions/shared_ownership_type_spec.rb | 2 +- spec/requests/form_controller_spec.rb | 2 +- spec/views/form/page_view_spec.rb | 2 +- 32 files changed, 286 insertions(+), 197 deletions(-) delete mode 100644 app/views/form/guidance/_privacy_notice_buyer_2024.erb delete mode 100644 app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb delete mode 100644 app/views/form/guidance/_privacy_notice_tenant_2024.erb delete mode 100644 app/views/form/guidance/_rent_type_definitions_2024.erb delete mode 100644 app/views/form/guidance/_shared_ownership_type_definitions_2024.erb create mode 100644 config/locales/forms/2023/lettings/guidance.en.yml create mode 100644 config/locales/forms/2023/sales/guidance.en.yml create mode 100644 config/locales/forms/2024/lettings/guidance.en.yml create mode 100644 config/locales/forms/2024/sales/guidance.en.yml diff --git a/app/models/form/lettings/questions/declaration.rb b/app/models/form/lettings/questions/declaration.rb index c88c7cf3c..0e2fd5b2c 100644 --- a/app/models/form/lettings/questions/declaration.rb +++ b/app/models/form/lettings/questions/declaration.rb @@ -4,7 +4,7 @@ class Form::Lettings::Questions::Declaration < ::Form::Question @id = "declaration" @type = "checkbox" @check_answers_card_number = 0 unless form.start_year_after_2024? - @top_guidance_partial = form.start_year_after_2024? ? "privacy_notice_tenant_2024" : "privacy_notice_tenant" + @top_guidance_partial = "privacy_notice_tenant" @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/rent_type.rb b/app/models/form/lettings/questions/rent_type.rb index 818ead98a..bc6934200 100644 --- a/app/models/form/lettings/questions/rent_type.rb +++ b/app/models/form/lettings/questions/rent_type.rb @@ -4,7 +4,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question @id = "rent_type" @copy_key = "lettings.setup.rent_type.rent_type" @type = "radio" - @top_guidance_partial = form.start_year_after_2024? ? "rent_type_definitions_2024" : "rent_type_definitions" + @top_guidance_partial = "rent_type_definitions" @answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_2024 : ANSWER_OPTIONS @conditional_for = { "irproduct_other" => [5] } @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present? diff --git a/app/models/form/sales/questions/privacy_notice.rb b/app/models/form/sales/questions/privacy_notice.rb index 95921737f..57f77041b 100644 --- a/app/models/form/sales/questions/privacy_notice.rb +++ b/app/models/form/sales/questions/privacy_notice.rb @@ -29,11 +29,7 @@ class Form::Sales::Questions::PrivacyNotice < ::Form::Question end def guidance - if form.start_year_after_2024? - @joint_purchase ? "privacy_notice_buyer_2024_joint_purchase" : "privacy_notice_buyer_2024" - else - @joint_purchase ? "privacy_notice_buyer_joint_purchase" : "privacy_notice_buyer" - end + @joint_purchase ? "privacy_notice_buyer_joint_purchase" : "privacy_notice_buyer" end QUESTION_NUMBER_FROM_YEAR = { 2023 => 19, 2024 => 14 }.freeze diff --git a/app/models/form/sales/questions/shared_ownership_type.rb b/app/models/form/sales/questions/shared_ownership_type.rb index 1ede14a4d..9ac998313 100644 --- a/app/models/form/sales/questions/shared_ownership_type.rb +++ b/app/models/form/sales/questions/shared_ownership_type.rb @@ -3,7 +3,7 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question super @id = "type" @copy_key = "sales.setup.type.shared_ownership" - @top_guidance_partial = guidance_partial + @top_guidance_partial = "shared_ownership_type_definitions" @type = "radio" @answer_options = answer_options @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @@ -34,13 +34,5 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question end end - def guidance_partial - if form.start_year_after_2024? - "shared_ownership_type_definitions_2024" - elsif form.start_date.year >= 2023 - "shared_ownership_type_definitions" - end - end - QUESTION_NUMBER_FROM_YEAR = { 2023 => 4, 2024 => 6 }.freeze end diff --git a/app/views/form/guidance/_discounted_ownership_type_definitions.erb b/app/views/form/guidance/_discounted_ownership_type_definitions.erb index 0102a836a..2895e751d 100644 --- a/app/views/form/guidance/_discounted_ownership_type_definitions.erb +++ b/app/views/form/guidance/_discounted_ownership_type_definitions.erb @@ -1,23 +1,5 @@ -<%= govuk_details(summary_text: "Discounted ownership type definitions") do %> -
- Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider. -
-- Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider. -
-- Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme. -
-- Right to Buy (RTB): a discounted sale to tenants in this council owned property. -
-- Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent. -
-- Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms. -
-- Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity. -
-<% end %> +A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode.
-<%= govuk_link_to("Read more about schemes and locations", scheme_changes_path) %>
-<% end %> +<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_location.content").html_safe %>
+<%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_location.scheme_changes_link_text"), scheme_changes_path) %>
+ <% end %> +Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"
-If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
-<%= govuk_link_to("View your organisation’s schemes", clear_filters_url(filter_type: "schemes")) %>
-<%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %>
-<% end %> +<%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.view_schemes_link_text"), clear_filters_url(filter_type: "schemes")) %>
+<%= govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.finding_scheme.scheme_changes_link_text"), scheme_changes_path) %>
+ <% end %> +- Outright sale: the full purchase of a property, usually with a mortgage or cash. -
-- Other sale: any sale which does not fit the criteria of any of the remaining options. -
-<% end %> +Make sure the buyer has seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.
++ <%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %> +
diff --git a/app/views/form/guidance/_privacy_notice_buyer_2024.erb b/app/views/form/guidance/_privacy_notice_buyer_2024.erb deleted file mode 100644 index 1ed6e683e..000000000 --- a/app/views/form/guidance/_privacy_notice_buyer_2024.erb +++ /dev/null @@ -1 +0,0 @@ -Make sure the buyer has seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.
diff --git a/app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb b/app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb deleted file mode 100644 index 74ce54a3d..000000000 --- a/app/views/form/guidance/_privacy_notice_buyer_2024_joint_purchase.erb +++ /dev/null @@ -1 +0,0 @@ -Make sure the buyers have seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.
diff --git a/app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb b/app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb index edab9e1e9..c23f5fd52 100644 --- a/app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb +++ b/app/views/form/guidance/_privacy_notice_buyer_joint_purchase.erb @@ -1 +1,3 @@ -Make sure the buyers have seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.
++ <%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer_joint_purchase.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.privacy_notice_buyer_joint_purchase.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %> +
diff --git a/app/views/form/guidance/_privacy_notice_tenant.erb b/app/views/form/guidance/_privacy_notice_tenant.erb index 7df685448..8b557c992 100644 --- a/app/views/form/guidance/_privacy_notice_tenant.erb +++ b/app/views/form/guidance/_privacy_notice_tenant.erb @@ -1 +1,3 @@ -Make sure the tenant has seen <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log.
++ <%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.privacy_notice_tenant.content", privacy_notice_link: "#{govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.privacy_notice_tenant.privacy_notice_link_text"), privacy_notice_path, target: :_blank}").html_safe %> +
diff --git a/app/views/form/guidance/_privacy_notice_tenant_2024.erb b/app/views/form/guidance/_privacy_notice_tenant_2024.erb deleted file mode 100644 index 12de7baba..000000000 --- a/app/views/form/guidance/_privacy_notice_tenant_2024.erb +++ /dev/null @@ -1 +0,0 @@ -Make sure the lead tenant has seen or been given access to <%= govuk_link_to "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice", privacy_notice_path, target: :_blank %> before completing this log. This is a legal requirement under data protection legislation.
diff --git a/app/views/form/guidance/_rent_type_definitions.erb b/app/views/form/guidance/_rent_type_definitions.erb index 1e008ee60..1c3b038e8 100644 --- a/app/views/form/guidance/_rent_type_definitions.erb +++ b/app/views/form/guidance/_rent_type_definitions.erb @@ -1,21 +1,5 @@ -<%= govuk_details(summary_text: "Rent type definitions") do %> -- Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA). -
-- London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings. -
-- London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings. -
-- Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings. -
-- Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'. -
- -- Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented. -
-<% end %> +- Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'. -
-- Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA). -
-- London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings. -
-- Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings. -
-- London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings. -
- -- Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented. -
-<% end %> diff --git a/app/views/form/guidance/_scheme_selection.html.erb b/app/views/form/guidance/_scheme_selection.html.erb index c13edb05b..3aaff4a4a 100644 --- a/app/views/form/guidance/_scheme_selection.html.erb +++ b/app/views/form/guidance/_scheme_selection.html.erb @@ -1,5 +1,5 @@ <% if current_user.data_provider? %> -If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the <%= govuk_link_to("users page", users_path) %>.
+<%= I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_provider.content", users_page_link: govuk_link_to(I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_provider.users_page_link_text"), users_path).to_s).html_safe %>
<% elsif current_user.data_coordinator? %> -<%= govuk_link_to "Create a new supported housing scheme", new_scheme_path %>
+<%= govuk_link_to I18n.t("forms.#{@log.form.start_date.year}.lettings.guidance.scheme_selection.data_coordinator.create_scheme_link_text"), new_scheme_path %>
<% end %> diff --git a/app/views/form/guidance/_shared_ownership_type_definitions.erb b/app/views/form/guidance/_shared_ownership_type_definitions.erb index 95cd65533..06c5f864e 100644 --- a/app/views/form/guidance/_shared_ownership_type_definitions.erb +++ b/app/views/form/guidance/_shared_ownership_type_definitions.erb @@ -1,26 +1,5 @@ -<%= govuk_details(summary_text: "Shared ownership type definitions") do %> -- Shared ownership: Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties. -
-- Shared ownership 2021 model lease: Homes bought using the Affordable Homes Programme 2021 to 2026. -
-- Older Persons Shared Ownership: A type of shared ownership for those 55 years and over. -
-- Social HomeBuy shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms. -
-- Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities. -
-- Rent to Buy shared ownership: A sale following a period of discounted rent. -
-- Right to Shared Ownership: A sale of a share of a rented home to a tenant using this scheme. -
-- London Living Rent shared ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme. -
-<% end %> +- Shared Ownership (old model lease): Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties. -
-- Shared Ownership (new model lease): Homes bought using the Affordable Homes Programme 2021 to 2026. -
-- Social HomeBuy — shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms. -
-- Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities. -
-- Older Persons Shared Ownership: A type of shared ownership for those 55 years and over. -
-- Rent to Buy — Shared Ownership: A sale following a period of discounted rent. -
-- Right to Shared Ownership (RtSO): A sale of a share of a rented home to a tenant using this scheme. -
-- London Living Rent — Shared Ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme. -
-<% end %> diff --git a/app/views/form/guidance/_void_date.html.erb b/app/views/form/guidance/_void_date.html.erb index 69ea9384f..76e9e22e2 100644 --- a/app/views/form/guidance/_void_date.html.erb +++ b/app/views/form/guidance/_void_date.html.erb @@ -1,9 +1,5 @@ -<%= govuk_details(summary_text: "What is a void date?") do %> -Date the property was (legally or contractually) available to let, or for:
-You should include any income after tax from:
-Don’t include:
-Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
" + scheme_changes_link_text: "Read more about how schemes have changed" + view_schemes_link_text: "View your organisation’s schemes" + + privacy_notice_tenant: + content: "Make sure the tenant has seen %{privacy_notice_link} before completing this log." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" + + rent_type_definitions: + title: "Rent type definitions" + content: "Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
" + + scheme_selection: + data_provider: + content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}." + users_page_link_text: "users page" + data_coordinator: + create_scheme_link_text: "Create a new supported housing scheme" + + void_date: + title: "What is a void date?" + content: "Date the property was (legally or contractually) available to let, or for:
+You should include any income after tax from:
+Don’t include:
+Shared ownership: Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the 2021 model lease for these properties.
+Shared ownership 2021 model lease: Homes bought using the Affordable Homes Programme 2021 to 2026.
+Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+Social HomeBuy shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+>Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+Rent to Buy shared ownership: A sale following a period of discounted rent.
+Right to Shared Ownership: A sale of a share of a rented home to a tenant using this scheme.
+London Living Rent shared ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
" + + discounted_ownership_type_definitions: + title: "Discounted Ownership Type Definitions" + content: "Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
" + + mortgage_lender: + title: "Can’t find the mortgage lender you’re looking for?" + content: "Outright sale: the full purchase of a property, usually with a mortgage or cash.
+Other sale: any sale which does not fit the criteria of any of the remaining options.
" + + privacy_notice_buyer_joint_purchase: + content: "Make sure the buyers have seen %{privacy_notice_link} before completing this log." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" + + privacy_notice_buyer: + content: "Make sure the buyer has seen %{privacy_notice_link} before completing this log." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" + \ No newline at end of file diff --git a/config/locales/forms/2024/lettings/guidance.en.yml b/config/locales/forms/2024/lettings/guidance.en.yml new file mode 100644 index 000000000..922124a94 --- /dev/null +++ b/config/locales/forms/2024/lettings/guidance.en.yml @@ -0,0 +1,63 @@ +en: + forms: + 2024: + lettings: + guidance: + finding_location: + title: "What is a location?" + content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode." + scheme_changes_link_text: "Read more about schemes and locations" + + finding_scheme: + title: "Can’t find your scheme?" + content: "Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
" + scheme_changes_link_text: "Read more about how schemes have changed" + view_schemes_link_text: "View your organisation’s schemes" + + privacy_notice_tenant: + content: "Make sure the lead tenant has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" + + rent_type_definitions: + title: "Rent type definitions" + content: "Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
" + + scheme_selection: + data_provider: + content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}." + users_page_link_text: "users page" + data_coordinator: + create_scheme_link_text: "Create a new supported housing scheme" + + void_date: + title: "What is a void date?" + content: "Date the property was (legally or contractually) available to let, or for:
+You should include any income after tax from:
+Don’t include:
+Shared Ownership (old model lease): Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.
+Shared Ownership (new model lease): Homes bought using the Affordable Homes Programme 2021 to 2026.
+Social HomeBuy — shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+Rent to Buy — Shared Ownership: A sale following a period of discounted rent.
+Right to Shared Ownership (RtSO): A sale of a share of a rented home to a tenant using this scheme.
+London Living Rent — Shared Ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
" + + discounted_ownership_type_definitions: + title: "Discounted Ownership Type Definitions" + content: "Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
" + + mortgage_lender: + title: "Can’t find the mortgage lender you’re looking for?" + content: "Outright sale: the full purchase of a property, usually with a mortgage or cash.
+Other sale: any sale which does not fit the criteria of any of the remaining options.
" + + privacy_notice_buyer_joint_purchase: + content: "Make sure the buyers have seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" + + privacy_notice_buyer: + content: "Make sure the buyer has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation." + privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" diff --git a/spec/models/form/lettings/questions/declaration_spec.rb b/spec/models/form/lettings/questions/declaration_spec.rb index bf8743520..fe1ae882d 100644 --- a/spec/models/form/lettings/questions/declaration_spec.rb +++ b/spec/models/form/lettings/questions/declaration_spec.rb @@ -67,7 +67,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do end it "uses the expected top guidance partial" do - expect(question.top_guidance_partial).to eq("privacy_notice_tenant_2024") + expect(question.top_guidance_partial).to eq("privacy_notice_tenant") end it "has check_answers_card_number nil" do diff --git a/spec/models/form/lettings/questions/rent_type_spec.rb b/spec/models/form/lettings/questions/rent_type_spec.rb index 15183ce6b..0716cdbf7 100644 --- a/spec/models/form/lettings/questions/rent_type_spec.rb +++ b/spec/models/form/lettings/questions/rent_type_spec.rb @@ -73,7 +73,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do end it "has the correct guidance partial" do - expect(question.top_guidance_partial).to eq("rent_type_definitions_2024") + expect(question.top_guidance_partial).to eq("rent_type_definitions") end end end diff --git a/spec/models/form/sales/questions/privacy_notice_spec.rb b/spec/models/form/sales/questions/privacy_notice_spec.rb index 48de6056f..3f8c030b0 100644 --- a/spec/models/form/sales/questions/privacy_notice_spec.rb +++ b/spec/models/form/sales/questions/privacy_notice_spec.rb @@ -94,7 +94,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do end it "uses the expected top guidance partial" do - expect(question.top_guidance_partial).to eq("privacy_notice_buyer_2024") + expect(question.top_guidance_partial).to eq("privacy_notice_buyer") end it "returns correct unanswered_error_message" do @@ -116,7 +116,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do end it "uses the expected top guidance partial" do - expect(question.top_guidance_partial).to eq("privacy_notice_buyer_2024_joint_purchase") + expect(question.top_guidance_partial).to eq("privacy_notice_buyer_joint_purchase") end it "returns correct unanswered_error_message" do diff --git a/spec/models/form/sales/questions/shared_ownership_type_spec.rb b/spec/models/form/sales/questions/shared_ownership_type_spec.rb index 19cae6e89..91cf6da9e 100644 --- a/spec/models/form/sales/questions/shared_ownership_type_spec.rb +++ b/spec/models/form/sales/questions/shared_ownership_type_spec.rb @@ -63,7 +63,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do end it "shows shows correct top_guidance_partial" do - expect(question.top_guidance_partial).to eq("shared_ownership_type_definitions_2024") + expect(question.top_guidance_partial).to eq("shared_ownership_type_definitions") end end end diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index 94f6595c7..13d711c20 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -412,7 +412,7 @@ RSpec.describe FormController, type: :request do context "with a form page that has custom guidance" do it "displays the correct partial" do get "/lettings-logs/#{lettings_log.id}/net-income", headers: headers, params: {} - expect(response.body).to match("What counts as income?") + expect(response.body).to match(I18n.t("forms.2021.lettings.guidance.what_counts_as_income.title")) end end diff --git a/spec/views/form/page_view_spec.rb b/spec/views/form/page_view_spec.rb index 16c4c0672..a95c98e93 100644 --- a/spec/views/form/page_view_spec.rb +++ b/spec/views/form/page_view_spec.rb @@ -100,7 +100,7 @@ RSpec.describe "form/page" do end context "with a question containing extra guidance" do - let(:expected_guidance) { /What counts as income?/ } + let(:expected_guidance) { /#{I18n.t("forms.2021.lettings.guidance.what_counts_as_income.content")}/ } context "with radio type" do let(:question_attributes) { { type: "radio", answer_options: { "1": "A", "2": "B" } } } From 3cda5adf5c83608c9e9ead13447b2d05491760c1 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:47:40 +0000 Subject: [PATCH 2/3] CLDC-3683 Extract lettings household situation copy (#2730) * Extract lettings household situation copy * Update wrong copy, remove duplicate keys --- .../pages/previous_housing_situation.rb | 1 + .../previous_housing_situation_renewal.rb | 1 + .../pages/previous_local_authority.rb | 1 + .../form/lettings/pages/previous_postcode.rb | 1 + .../reason_for_leaving_last_settled_home.rb | 1 + ...n_for_leaving_last_settled_home_renewal.rb | 1 + app/models/form/lettings/pages/referral.rb | 1 + .../form/lettings/pages/referral_prp.rb | 1 + .../pages/referral_supported_housing.rb | 1 + .../pages/referral_supported_housing_prp.rb | 1 + .../form/lettings/questions/homeless.rb | 3 - app/models/form/lettings/questions/layear.rb | 3 - .../lettings/questions/letting_allocation.rb | 3 - .../form/lettings/questions/ppcodenk.rb | 4 +- .../form/lettings/questions/ppostcode_full.rb | 4 +- .../lettings/questions/previous_la_known.rb | 4 +- .../lettings/questions/previous_tenure.rb | 4 +- .../questions/previous_tenure_renewal.rb | 5 +- app/models/form/lettings/questions/prevloc.rb | 4 +- app/models/form/lettings/questions/reason.rb | 4 +- .../form/lettings/questions/reason_renewal.rb | 4 +- .../questions/reasonable_preference_reason.rb | 3 - .../form/lettings/questions/reasonother.rb | 4 +- .../form/lettings/questions/reasonpref.rb | 3 - .../form/lettings/questions/referral.rb | 4 +- .../form/lettings/questions/referral_prp.rb | 4 +- .../questions/referral_supported_housing.rb | 4 +- .../referral_supported_housing_prp.rb | 4 +- .../form/lettings/questions/waityear.rb | 3 - .../2023/lettings/household_situation.en.yml | 120 ++++++++++++++++++ .../2024/lettings/household_situation.en.yml | 120 ++++++++++++++++++ .../form/lettings/questions/homeless_spec.rb | 2 +- .../lettings/questions/reason_renewal_spec.rb | 2 +- .../form/lettings/questions/reason_spec.rb | 2 +- 34 files changed, 266 insertions(+), 61 deletions(-) create mode 100644 config/locales/forms/2023/lettings/household_situation.en.yml create mode 100644 config/locales/forms/2024/lettings/household_situation.en.yml 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.