clarion/app/views/management/volunteers/_form.html.slim

25 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-10-09 07:17:34 +03:00
= simple_form_for [:management, current_conference, @volunteer], wrapper: :horizontal_form, html: { class: 'form-horizontal' } do |f|
.panel.panel-default
.panel-body
.row
.col-lg-12
- if f.object.picture.present?
.col-sm-offset-3.col-sm-9
= @volunteer.picture.variant(resize_to_limit: [150, 150]) if @volunteer.picture.attached?
2016-10-09 07:17:34 +03:00
= f.input :picture, as: :file, wrapper: :horizontal_file_input, direct: true
2016-10-09 07:17:34 +03:00
= f.input :name, autofocus: true
= f.input :email
= f.association :volunteer_team, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, collection: current_conference.volunteer_teams
= f.association :additional_volunteer_teams, as: :check_boxes, wrapper: :horizontal_radio_and_checkboxes, collection: current_conference.volunteer_teams
2016-10-09 07:17:34 +03:00
= f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)}
= f.input :language, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, collection: locale_collection, include_blank: false, checked: (@volunteer.language.presence || I18n.locale)
= f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :horizontal_radio_and_checkboxes, checked: (@volunteer.tshirt_size.presence || :m)
= f.input :tshirt_cut, collection: Volunteer::TSHIRT_CUTS, wrapper: :horizontal_radio_and_checkboxes, as: :radio_buttons, checked: (@volunteer.tshirt_cut.presence || :unisex)
= f.input :food_preferences, collection: Volunteer::FOOD_PREFERENCES, wrapper: :horizontal_radio_and_checkboxes, as: :radio_buttons, checked: (@volunteer.food_preferences.presence || :none)
= f.input :previous_experience
= f.input :notes
.panel-footer.text-right
= f.submit class: 'btn btn-primary'