Browse Source

add locations page is finished

pull/704/head
JG 3 years ago
parent
commit
090a1c590d
  1. 2
      app/models/location.rb
  2. 10
      app/views/locations/new.html.erb

2
app/models/location.rb

@ -1,6 +1,8 @@
class Location < ApplicationRecord class Location < ApplicationRecord
belongs_to :scheme belongs_to :scheme
attr_accessor :add_another_location
WHEELCHAIR_ADAPTATIONS = { WHEELCHAIR_ADAPTATIONS = {
No: 0, No: 0,
Yes: 1, Yes: 1,

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

@ -48,6 +48,16 @@
<%= govuk_section_break(visible: true, size: "m") %> <%= 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" %> <%= f.govuk_submit "Save and continue" %>
</div> </div>
</div> </div>

Loading…
Cancel
Save