osem-fcy/app/views/conference_registrations/_form.html.haml
2014-12-05 16:04:34 +01:00

23 lines
1.4 KiB
Text

.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
.row
.col-md-8
= semantic_form_for(@registration, url: conference_conference_registrations_path(@conference.short_title)) do |f|
- if @conference.questions.any?
= render partial: 'questions', locals: { f: f }
- if @conference.events.workshops.any?
=f.inputs 'Register to Workshops' do
= f.input :events, as: :check_boxes, label: false, collection: @conference.events.workshops
= f.inputs 'Your Travel Info' do
= f.input :arrival, as: :string, label: 'Your arrival time', input_html: { value: (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), id: 'registration-arrival-datepicker', readonly: 'readonly' }
= f.input :departure, as: :string, label: 'Your departure time', input_html: { value: (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), id: 'registration-departure-datepicker', readonly: 'readonly' }
%p.pull-right
- if @conference.user_registered?(current_user)
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
- else
= f.action :submit, button_html: { value: 'Register', class: 'btn btn-primary', id: 'register' }