Browse Source

added postcode

pull/704/head
JG 3 years ago
parent
commit
4622a07471
  1. 1
      app/controllers/locations_controller.rb
  2. 14
      app/views/locations/new.html.erb

1
app/controllers/locations_controller.rb

@ -3,6 +3,7 @@ class LocationsController < ApplicationController
before_action :authenticate_scope! before_action :authenticate_scope!
def new def new
@scheme = Scheme.find(12)
@location = Location.new @location = Location.new
end end

14
app/views/locations/new.html.erb

@ -7,14 +7,22 @@
) %> ) %>
<% end %> <% end %>
<%= render partial: "organisations/headings", locals: { main: "Add a location to this scheme", sub: @scheme.service_name } %>
<%= form_for(@location, method: :post, url: location_create_scheme_path) do |f| %> <%= form_for(@location, method: :post, url: location_create_scheme_path) do |f| %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<h1 class="govuk-heading-l"> <%= f.govuk_text_field :postcode,
<%= content_for(:title) %> label: { size: "m" },
</h1> hint: { text: "For example, SW1P 4DF." },
width: 5 %>
<%= f.govuk_text_field :name,
label: { text: "Name (optional)", size: "m" },
hint: { text: "This is how you refer to this location within your organisation" } %>
<%= f.govuk_submit "Save and continue" %> <%= f.govuk_submit "Save and continue" %>
</div> </div>

Loading…
Cancel
Save