Retire semantic_form_for

Also a buttload of form cleanups...
This commit is contained in:
Henne Vogelsang 2022-02-23 17:52:16 +01:00
parent 350b1ebbbe
commit 81853d1ef9
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
136 changed files with 1825 additions and 1441 deletions

View file

@ -1,7 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.date_select :day %>
<%= f.input :description, input_html: {rows: '2', class: 'col-md-8'} %>
<%= remove_association_link :vday, f %>
<% end %>
</div>

View file

@ -0,0 +1,4 @@
.nested-fields
= f.date_select :day
= f.text_field :description, rows: '2', class: 'col-md-8'
= remove_association_link :vday, f

View file

@ -1,8 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :description, input_html: {rows: '2', class: 'col-md-8'}%>
<%= f.input :vdays, collection: @conference.vdays.map {|x| [x.day, x.id]}, label: 'Position is required for the following days:'%>
<%= remove_association_link :vposition, f %>
<% end %>
</div>

View file

@ -0,0 +1,6 @@
.nested-fields
= f.text_field :title
= f.text_area :description, rows: '2', class: 'col-md-8'
= f.label :vdays, 'Position is required for the following days:'
= f.select :vdays, @conference.vdays.pluck(:day, :id)
= remove_association_link :vposition, f

View file

@ -1,14 +1,15 @@
.row
.col-md-8
= semantic_form_for(@conference, url: admin_conference_volunteers_update_path(@conference.short_title)) do |f|
= f.action :submit, as: :button, button_html: {class: 'btn btn-primary'}
%br
%br
= f.input :use_volunteers, label: 'Enable Volunteering'
.row
.col-md-6
= f.input :use_vdays, label: false
= dynamic_association :vdays, "Volunteer Days", f
.col-md-6
= f.input :use_vpositions, label: false
= dynamic_association :vpositions, "Volunteer positions", f
= form_for(@conference, url: admin_conference_volunteers_update_path(@conference.short_title)) do |f|
= f.submit nil, class: 'btn btn-primary'
.checkbox
%label
= f.check_box :use_volunteers
Enable Volunteering
.checkbox
%label
= f.check_box :use_vdays
= dynamic_association :vdays, "Volunteer Days", f
.col-md-6
= f.check_box :use_vpositions
= dynamic_association :vpositions, "Volunteer positions", f