Submit social housing lettings and sales data (CORE)
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.
 
 
 
 

33 lines
1.4 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_locations_path(@scheme),
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_postcode_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: I18n.t("questions.location.postcode"), sub: "Add a location to #{@scheme.service_name}" } %>
<%= f.govuk_text_field :postcode,
label: { size: "m" },
hint: { text: I18n.t("hints.location.postcode") },
width: 5 %>
<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 %>