Browse Source

Align address questions, add question number and question text

CLDC-3787-Autocomplete-address-search
Manny Dinssa 5 days ago
parent
commit
67b3acb99e
  1. 3
      app/models/form/lettings/pages/address_search.rb
  2. 3
      app/models/form/sales/pages/address_search.rb
  3. 2
      config/locales/forms/2024/lettings/property_information.en.yml
  4. 2
      config/locales/forms/2024/sales/property_information.en.yml
  5. 2
      config/locales/forms/2025/lettings/property_information.en.yml
  6. 2
      config/locales/forms/2025/sales/property_information.en.yml

3
app/models/form/lettings/pages/address_search.rb

@ -3,6 +3,7 @@ class Form::Lettings::Pages::AddressSearch < ::Form::Page
super
@id = "address_search"
@depends_on = [{ "is_supported_housing?" => false, "address_search_input" => true }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def questions
@ -16,4 +17,6 @@ class Form::Lettings::Pages::AddressSearch < ::Form::Page
"/#{log.log_type.dasherize}s/#{log.id}/first-time-property-let-as-social-housing"
end
QUESTION_NUMBER_FROM_YEAR = { 2024 => 12, 2025 => 12 }.freeze
end

3
app/models/form/sales/pages/address_search.rb

@ -3,6 +3,7 @@ class Form::Sales::Pages::AddressSearch < ::Form::Page
super
@id = "address_search"
@depends_on = [{ "address_search_input" => true }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def questions
@ -16,4 +17,6 @@ class Form::Sales::Pages::AddressSearch < ::Form::Page
"/#{log.log_type.dasherize}s/#{log.id}/property-number-of-bedrooms"
end
QUESTION_NUMBER_FROM_YEAR = { 2024 => 15, 2025 => 15 }.freeze
end

2
config/locales/forms/2024/lettings/property_information.en.yml

@ -51,7 +51,7 @@ en:
question_text: "Select the correct address"
address_search:
page_header: "Address"
page_header: "What is the property's address?"
check_answer_label: "Address"
check_answer_prompt: "Enter address or UPRN"
hint_text: "For example, '1 Victoria Road' or '10010457355'"

2
config/locales/forms/2024/sales/property_information.en.yml

@ -44,7 +44,7 @@ en:
question_text: "Select the correct address"
address_search:
page_header: "Address"
page_header: "What is the property's address?"
check_answer_label: "Address"
check_answer_prompt: "Enter address or UPRN"
hint_text: "For example, '1 Victoria Road' or '10010457355'"

2
config/locales/forms/2025/lettings/property_information.en.yml

@ -51,7 +51,7 @@ en:
question_text: "Select the correct address"
address_search:
page_header: "Address"
page_header: "What is the property's address?"
check_answer_label: "Address"
check_answer_prompt: "Enter address or UPRN"
hint_text: "For example, '1 Victoria Road' or '10010457355'"

2
config/locales/forms/2025/sales/property_information.en.yml

@ -44,7 +44,7 @@ en:
question_text: "Select the correct address"
address_search:
page_header: "Address"
page_header: "What is the property's address?"
check_answer_label: "Address"
check_answer_prompt: "Enter address or UPRN"
hint_text: "For example, '1 Victoria Road' or '10010457355'"

Loading…
Cancel
Save