clarion/lib/initfest/views/public/volunteers/_form.slim

27 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2015-10-21 23:13:39 +03:00
- form_url = @volunteer.new_record? ? volunteers_path : volunteer_path(@volunteer.unique_id)
= simple_form_for @volunteer, wrapper: :default, url: form_url do |f|
= f.error_notification
.form-inputs
.input
= image_tag(@volunteer.picture.variant(resize_to_limit: [150, 150])) if @volunteer.picture.attached?
= f.hidden_field :picture, value: @volunteer.picture.signed_id if @volunteer.picture.attached?
= f.input :picture, as: :file, required: false, direct: true, wrapper: false, input_html: {direct_upload: true}
2024-04-19 14:42:10 +03:00
= text_field :volunteer_ht, :full_name, class: 'special-form-field', tabindex: "-1", "aria-hidden": true, role: "presentation", autocomplete: "off"
2024-04-18 21:11:08 +03:00
= label :volunteer_ht, :full_name, 'Full Name', class: 'special-form-field', "aria-hidden": true
2015-10-21 23:13:39 +03:00
= f.input :name, autofocus: true
= f.input :email
= f.input :phone, input_html: {value: @volunteer.phone.try(:phony_formatted, format: :international)}
= f.association :volunteer_team, as: :radio_buttons, wrapper: :default, collection: current_conference.volunteer_teams
2015-10-21 23:13:39 +03:00
= f.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: (@volunteer.language.presence || I18n.locale)
= f.input :tshirt_size, collection: Volunteer::TSHIRT_SIZES, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_size.presence || :m)
= f.input :tshirt_cut, collection: Volunteer::TSHIRT_CUTS, as: :radio_buttons, wrapper: :default, checked: (@volunteer.tshirt_cut.presence || :unisex)
= f.input :food_preferences, collection: Volunteer::FOOD_PREFERENCES, as: :radio_buttons, wrapper: :default, checked: (@volunteer.food_preferences.presence || :none)
= f.input :previous_experience
= f.input :notes
.form-actions
= f.button :submit