Retire semantic_form_for
Also a buttload of form cleanups...
This commit is contained in:
parent
350b1ebbbe
commit
81853d1ef9
136 changed files with 1825 additions and 1441 deletions
|
|
@ -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>
|
||||
4
app/views/admin/volunteers/_vday_fields.html.haml
Normal file
4
app/views/admin/volunteers/_vday_fields.html.haml
Normal 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
|
||||
|
|
@ -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>
|
||||
6
app/views/admin/volunteers/_vposition_fields.html.haml
Normal file
6
app/views/admin/volunteers/_vposition_fields.html.haml
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue