Browse Source

Split location id copy

pull/2723/head
Manny Dinssa 2 years ago
parent
commit
5d4fd9848e
  1. 1
      app/models/form/lettings/pages/location.rb
  2. 1
      app/models/form/lettings/pages/location_search.rb
  3. 1
      app/models/form/lettings/questions/location_id.rb
  4. 2
      app/models/form/lettings/questions/location_id_search.rb
  5. 15
      config/locales/forms/2023/lettings/setup.en.yml
  6. 15
      config/locales/forms/2024/lettings/setup.en.yml

1
app/models/form/lettings/pages/location.rb

@ -8,6 +8,7 @@ class Form::Lettings::Pages::Location < ::Form::Page
"scheme_has_large_number_of_locations?" => false,
},
]
@copy_key = "lettings.setup.location_id.less_than_twenty"
@next_unresolved_page_id = :check_answers
end

1
app/models/form/lettings/pages/location_search.rb

@ -8,6 +8,7 @@ class Form::Lettings::Pages::LocationSearch < ::Form::Page
"scheme_has_large_number_of_locations?" => true,
},
]
@copy_key = "lettings.setup.location_id.twenty_or_more"
@next_unresolved_page_id = :check_answers
end

1
app/models/form/lettings/questions/location_id.rb

@ -2,6 +2,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
def initialize(id, hsh, page)
super
@id = "location_id"
@copy_key = "lettings.setup.location_id.less_than_twenty"
@type = "radio"
@answer_options = answer_options
@inferred_answers = {

2
app/models/form/lettings/questions/location_id_search.rb

@ -3,7 +3,7 @@ class Form::Lettings::Questions::LocationIdSearch < ::Form::Question
super
@id = "location_id"
@type = "select"
@hint = I18n.t("forms.#{form.start_date.year}.#{copy_key}.search_hint_text", default: "") if form.start_date.present?
@copy_key = "lettings.setup.location_id.twenty_or_more"
@answer_options = answer_options
@inferred_answers = {
"location.name": {

15
config/locales/forms/2023/lettings/setup.en.yml

@ -34,11 +34,16 @@ en:
question_text: "What scheme is this log for?"
location_id:
page_header: "Location"
check_answer_label: "Location"
hint_text: ""
search_hint_text: '<div class="govuk-inset-text">This scheme has 20 or more locations.</div>Enter postcode or address.'
question_text: "Which location is this log for?"
less_than_twenty:
page_header: "Location"
check_answer_label: "Location"
hint_text: ""
question_text: "Which location is this letting for?"
twenty_or_more:
page_header: "Location"
check_answer_label: "Location"
hint_text: '<div class="govuk-inset-text">This scheme has 20 or more locations.</div>Enter postcode or address.'
question_text: "Which location is this letting for?"
renewal:
page_header: ""

15
config/locales/forms/2024/lettings/setup.en.yml

@ -34,11 +34,16 @@ en:
question_text: "What scheme is this log for?"
location_id:
page_header: "Location"
check_answer_label: "Location"
hint_text: ""
search_hint_text: '<div class="govuk-inset-text">This scheme has 20 or more locations.</div>Enter postcode or address.'
question_text: "Which location is this letting for?"
less_than_twenty:
page_header: "Location"
check_answer_label: "Location"
hint_text: ""
question_text: "Which location is this letting for?"
twenty_or_more:
page_header: "Location"
check_answer_label: "Location"
hint_text: '<div class="govuk-inset-text">This scheme has 20 or more locations.</div>Enter postcode or address.'
question_text: "Which location is this letting for?"
renewal:
page_header: ""

Loading…
Cancel
Save