You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.6 KiB
35 lines
1.6 KiB
<% content_for :title, "Add a location to this scheme" %> |
|
|
|
<% content_for :before_content do %> |
|
<%= govuk_back_link( |
|
text: "Back", |
|
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_postcode_path(@scheme), |
|
) %> |
|
<% end %> |
|
|
|
<%= form_for(@location, method: :patch, url: scheme_location_local_authority_path(@scheme, @location, referrer: params[:referrer])) do |f| %> |
|
<div class="govuk-grid-row"> |
|
<div class="govuk-grid-column-two-thirds"> |
|
<%= f.govuk_error_summary %> |
|
|
|
<%= render partial: "organisations/headings", locals: { main: "What is the local authority of #{@location.postcode}?", sub: @scheme.service_name } %> |
|
|
|
<%= f.govuk_collection_select :location_admin_district, |
|
local_authorities_selection, |
|
:name, |
|
:name, |
|
label: { text: "Start typing to search for your local authority" }, |
|
"data-controller": %w[conditional-filter accessible-autocomplete] %> |
|
|
|
<div class="govuk-button-group"> |
|
<% if params[:referrer] == "check_answers" %> |
|
<%= f.govuk_submit "Save changes" %> |
|
<%= govuk_button_link_to "Cancel", scheme_location_check_answers_path(@scheme, @location), secondary: true %> |
|
<% else %> |
|
<%= f.govuk_submit "Save and continue" %> |
|
<%= govuk_button_link_to "Cancel", scheme_locations_path(@scheme), secondary: true %> |
|
<% end %> |
|
</div> |
|
</div> |
|
</div> |
|
<% end %>
|
|
|