Browse Source

Add location guidance

CLDC-2640-location-guidance
Kat 1 year ago
parent
commit
999a9a3e92
  1. 1
      app/models/form/lettings/pages/location.rb
  2. 1
      app/models/form/lettings/questions/location_id.rb
  3. 4
      app/views/form/guidance/_finding_location.erb
  4. 2
      spec/models/form/lettings/pages/location_spec.rb

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

@ -7,6 +7,7 @@ class Form::Lettings::Pages::Location < ::Form::Page
"scheme_has_multiple_locations?" => true,
},
]
@header = "Location"
@next_unresolved_page_id = :check_answers
end

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

@ -13,6 +13,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
}
@question_number = 10
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@top_guidance_partial = "finding_location"
end
def answer_options

4
app/views/form/guidance/_finding_location.erb

@ -0,0 +1,4 @@
<%= govuk_details(summary_text: "What is a location?") do %>
<p class="govuk-body">A location is a postcode 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.</p>
<p class="govuk-body"><%= govuk_link_to("Read more about how schemes and locations", scheme_changes_path) %></p>
<% end %>

2
spec/models/form/lettings/pages/location_spec.rb

@ -26,7 +26,7 @@ RSpec.describe Form::Lettings::Pages::Location, type: :model do
end
it "has the correct header" do
expect(page.header).to be_nil
expect(page.header).to eq("Location")
end
it "has the correct description" do

Loading…
Cancel
Save