From 090a1c590d3bc3c96e61627ea06cba69e9a86435 Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 30 Jun 2022 13:49:40 +0100 Subject: [PATCH] add locations page is finished --- app/models/location.rb | 2 ++ app/views/locations/new.html.erb | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/app/models/location.rb b/app/models/location.rb index db4f158e0..6db97b4e3 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -1,6 +1,8 @@ class Location < ApplicationRecord belongs_to :scheme + attr_accessor :add_another_location + WHEELCHAIR_ADAPTATIONS = { No: 0, Yes: 1, diff --git a/app/views/locations/new.html.erb b/app/views/locations/new.html.erb index 54158e875..7b5a4ea4f 100644 --- a/app/views/locations/new.html.erb +++ b/app/views/locations/new.html.erb @@ -48,6 +48,16 @@ <%= govuk_section_break(visible: true, size: "m") %> + <% another_location_selection = %w[No Yes].map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %> + + <%= f.govuk_collection_radio_buttons :add_another_location, + another_location_selection, + :id, + :name, + inline: true, + legend: { text: "Do you want to add another location?", size: "m" } %> + + <%= f.govuk_submit "Save and continue" %>