From 4622a0747110f3939311bce59544921a707abfc0 Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 30 Jun 2022 12:46:29 +0100 Subject: [PATCH] added postcode --- app/controllers/locations_controller.rb | 1 + app/views/locations/new.html.erb | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index 9ba609424..507c4c68a 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -3,6 +3,7 @@ class LocationsController < ApplicationController before_action :authenticate_scope! def new + @scheme = Scheme.find(12) @location = Location.new end diff --git a/app/views/locations/new.html.erb b/app/views/locations/new.html.erb index 5781dfffb..fd7385f0c 100644 --- a/app/views/locations/new.html.erb +++ b/app/views/locations/new.html.erb @@ -7,14 +7,22 @@ ) %> <% 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| %>
<%= f.govuk_error_summary %> -

- <%= content_for(:title) %> -

+ <%= f.govuk_text_field :postcode, + label: { size: "m" }, + 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" %>