Browse Source

Move guidance to partial

pull/2922/head
Manny Dinssa 2 weeks ago
parent
commit
d844c97fa1
  1. 1
      app/models/form/lettings/questions/address_search.rb
  2. 1
      app/models/form/sales/questions/address_search.rb
  3. 3
      app/views/form/guidance/_address_search.html.erb
  4. 2
      config/locales/forms/2024/lettings/property_information.en.yml
  5. 7
      config/locales/forms/2024/sales/guidance.en.yml
  6. 2
      config/locales/forms/2024/sales/property_information.en.yml
  7. 2
      config/locales/forms/2025/lettings/property_information.en.yml
  8. 7
      config/locales/forms/2025/sales/guidance.en.yml
  9. 2
      config/locales/forms/2025/sales/property_information.en.yml

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

@ -4,6 +4,7 @@ class Form::Lettings::Questions::AddressSearch < ::Form::Question
@id = "address_search"
@type = "address_autocomplete"
@plain_label = true
@bottom_guidance_partial = "address_search"
end
def answer_options(log = nil, _user = nil)

1
app/models/form/sales/questions/address_search.rb

@ -4,6 +4,7 @@ class Form::Sales::Questions::AddressSearch < ::Form::Question
@id = "address_search"
@type = "address_autocomplete"
@plain_label = true
@bottom_guidance_partial = "address_search"
end
def answer_options(log = nil, _user = nil)

3
app/views/form/guidance/_address_search.html.erb

@ -0,0 +1,3 @@
<%= govuk_details(summary_text: I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.address_search.title")) do %>
<%= I18n.t("forms.#{@log.form.start_date.year}.sales.guidance.address_search.content").html_safe %>
<% end %>

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

@ -54,7 +54,7 @@ en:
page_header: "Find address"
check_answer_label: "Find address"
check_answer_prompt: "Search for address or UPRN"
hint_text: "Start typing an address to see suggestions and select the correct one. Some properties may not be available yet; you might need to enter them manually in the next question. For UPRN (Unique Property Reference Number), please enter the full value exactly."
hint_text: "For example, '1 Victoria Road' or '10010457355'"
question_text: "Enter the address or UPRN to search"
address:

7
config/locales/forms/2024/sales/guidance.en.yml

@ -44,3 +44,10 @@ en:
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"
address_search:
title: "Can’t find the address you’re looking for?"
content: "<ul class=\"govuk-list govuk-list--bullet\">
<li>Some properties may not be available yet e.g. new builds; you might need to enter them manually in the next question</li>
<li>For UPRN (Unique Property Reference Number), please enter the full value exactly</li>
</ul>"

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

@ -47,7 +47,7 @@ en:
page_header: "Find address"
check_answer_label: "Find address"
check_answer_prompt: "Search for address or UPRN"
hint_text: "Start typing an address to see suggestions and select the correct one. Some properties may not be available yet; you might need to enter them manually in the next question. For UPRN (Unique Property Reference Number), please enter the full value exactly."
hint_text: "For example, '1 Victoria Road' or '10010457355'"
question_text: "Enter the address or UPRN to search"
address:

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

@ -54,7 +54,7 @@ en:
page_header: "Find address"
check_answer_label: "Find address"
check_answer_prompt: "Search for address or UPRN"
hint_text: "Start typing an address to see suggestions and select the correct one. Some properties may not be available yet; you might need to enter them manually in the next question. For UPRN (Unique Property Reference Number), please enter the full value exactly."
hint_text: "For example, '1 Victoria Road' or '10010457355'"
question_text: "Enter the address or UPRN to search"
address:

7
config/locales/forms/2025/sales/guidance.en.yml

@ -44,3 +44,10 @@ en:
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"
address_search:
title: "Can’t find the address you’re looking for?"
content: "<ul class=\"govuk-list govuk-list--bullet\">
<li>Some properties may not be available yet e.g. new builds; you might need to enter them manually in the next question</li>
<li>For UPRN (Unique Property Reference Number), please enter the full value exactly</li>
</ul>"

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

@ -47,7 +47,7 @@ en:
page_header: "Find address"
check_answer_label: "Find address"
check_answer_prompt: "Search for address or UPRN"
hint_text: "Start typing an address to see suggestions and select the correct one. Some properties may not be available yet; you might need to enter them manually in the next question. For UPRN (Unique Property Reference Number), please enter the full value."
hint_text: "For example, '1 Victoria Road' or '10010457355'"
question_text: "Enter the address or UPRN to search"
address:

Loading…
Cancel
Save