2014-03-17 16:36:32 +01:00
|
|
|
.row
|
|
|
|
|
.col-md-12
|
2014-11-25 10:47:18 +01:00
|
|
|
.page-header
|
|
|
|
|
%h1
|
|
|
|
|
Edit registration of #{@user.username} for #{@conference.short_title}
|
2014-03-17 16:36:32 +01:00
|
|
|
.row
|
2014-08-22 15:08:54 +02:00
|
|
|
.col-md-8
|
2014-05-15 20:30:01 +03:00
|
|
|
= semantic_form_for(@registration, :url => admin_conference_registration_path(@conference.short_title, @registration)) do |f|
|
2014-08-22 15:08:54 +02:00
|
|
|
= f.inputs 'Personal Information' do
|
2014-06-23 19:07:50 +03:00
|
|
|
= f.fields_for :user do |u|
|
2014-08-22 15:08:54 +02:00
|
|
|
= u.input :name, as: :string
|
|
|
|
|
= u.input :nickname, as: :string
|
|
|
|
|
= u.input :affiliation, placeholder: 'Company/User Group/nothing', as: :string
|
|
|
|
|
= f.inputs 'Registration Information' do
|
|
|
|
|
- @conference.questions.each do |q|
|
|
|
|
|
%h5
|
|
|
|
|
= "Q: #{q.title}"
|
|
|
|
|
- if q.question_type.id == 1 || q.question_type.id == 2 # yes/no or single choice
|
|
|
|
|
= f.input :qanswers, :collection => q.qanswers, :as => :select, :input_html => { :multiple => false }, :label => false, :include_blank => "Please make your choice",
|
|
|
|
|
:member_label => Proc.new {|a| a.answer.title}
|
|
|
|
|
- if q.question_type.id == 3 # multiple choice
|
|
|
|
|
= f.input :qanswers, :collection => q.qanswers, :as => :check_boxes, :label => false,
|
|
|
|
|
:member_label => Proc.new {|a| a.answer.title}
|
|
|
|
|
|
|
|
|
|
-# Not necessary
|
2014-03-17 16:36:32 +01:00
|
|
|
- if @conference.social_events.count > 0
|
2014-08-22 15:08:54 +02:00
|
|
|
= f.inputs 'Are you planning to attend any of the parties?' do
|
2014-03-17 16:36:32 +01:00
|
|
|
%br Yes, I'll be attending...
|
|
|
|
|
%br
|
2014-08-22 15:08:54 +02:00
|
|
|
= f.input :social_events, as: :check_boxes, label: false, collection: @conference.social_events
|
|
|
|
|
= f.action :submit, button_html: { value: 'Edit Registration', class: 'btn btn-primary' }
|