6 changed files with 59 additions and 11 deletions
@ -0,0 +1,35 @@ |
|||||||
|
<% 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 %> |
||||||
Loading…
Reference in new issue