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" %>