diff --git a/app/views/locations/new.html.erb b/app/views/locations/new.html.erb new file mode 100644 index 000000000..5781dfffb --- /dev/null +++ b/app/views/locations/new.html.erb @@ -0,0 +1,22 @@ +<% content_for :title, "Add a location to this scheme" %> + +<% content_for :before_content do %> + <%= govuk_back_link( + text: "Back", + href: "javascript:history.go(-1);", + ) %> +<% end %> + +<%= form_for(@location, method: :post, url: location_create_scheme_path) do |f| %> +
+
+ <%= f.govuk_error_summary %> + +

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

+ + <%= f.govuk_submit "Save and continue" %> +
+
+<% end %> diff --git a/config/routes.rb b/config/routes.rb index e8868c3f7..88d6aa30e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -46,6 +46,7 @@ Rails.application.routes.draw do member do get "locations", to: "schemes#locations" get "location/new", to: "locations#new" + post "location/create", to: "locations#create" end end