Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

155 lines
7.6 KiB

- title (_'conferences.register.page_title.Conference_Registration')
- content_for :banner do
- image = image_url(@conference.cover_url || 'empty-racks.jpg')
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
- if capable_of(:svg)
= render 'application/banner_image.svg', {:image => image}
%h1=_(@page_title || 'page_titles.conferences.Conference_Registration')
%article
= row do
- case @register_template
- when :confirm_email
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Confirm_You_Email_Address','Confirm Email Address'
= columns(medium: 6, large: 5) do
= form_tag register_path(@this_conference.slug) do
= button_tag :continue, :value => :confirm_email
- when :payment
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Payment'
%p=_'articles.conference_registration.paragraphs.Payment', 'Thank you for completing your registration. We\'ll see you at Bike!Bike! Payment is by donation and can be done now or upon arrival but to help us fund the conference, we ask that you pay the registration donation as soon as you can.'
= columns(large: 9, push: 1) do
= form_tag register_path(@this_conference.slug), :class => :payment do
= hidden_field_tag :button, :payment
.three-options
= button_tag nil, :name => :amount, :value => '25.0' do
= number_to_currency(25, :unit => '$')
= button_tag nil, :name => :amount, :value => '50.0' do
= number_to_currency(50, :unit => '$')
= button_tag nil, :name => :amount, :value => '100.0' do
= number_to_currency(100, :unit => '$')
= form_tag register_path(@this_conference.slug), :class => :payment do
%span.currency='$'
= number_field_tag :amount, nil, :required => true, :step => 0.01, :min => 0.00
= button_tag :custom_amount, :value => :payment
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
= columns(large: 2)
- when :policy
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Policy_Agreement'
%p=_'articles.conference_registration.paragraphs.Policy_Agreement', :s, 2
= columns(medium: 10, push: 1) do
%h3=_'articles.policy.headings.The_Agreement'
%ul
- [:commitment, :respect, :empowerment, :accessible, :peaceful, :spaces, :hearing, :intent, :open_minds, :learning].each do |term|
%li=_"articles.policy.term.#{term.to_s}", :s, 2
%h3=_'articles.policy.headings.Why','Why have a Safer Space Agreement?'
%p=_'articles.policy.paragraphs.Why', :p
%h3=_'articles.policy.headings.How','How is the policy enforced?'
%p=_'articles.policy.paragraphs.How', :p
= columns(medium: 12) do
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
= form_tag register_path(@this_conference.slug) do
.checkbox-field.input-field
= label_tag :policy_confirm
= check_box_tag :policy_confirm, "1", false, required: true
= button_tag :agree, :value => :policy
- when :questions
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Registration_Info','Registration Info'
= columns(medium: 5, large: 4) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p
= columns(medium: 7, large: 8) do
= form_tag register_path(@this_conference.slug) do
%h3=_'articles.conference_registration.headings.name','What is your name?'
.text-field.input-field
= label_tag :name
= text_field_tag :name, @name, required: true
%h3=_'articles.conference_registration.headings.location','Where are you coming from?'
.text-field.input-field
= label_tag :location
= text_field_tag :location, @registration.city, required: true
%h3=_'articles.conference_registration.headings.arrival_and_departure','How long do you plan to spend in the area?'
.date-span.input-field
.date-labels
= label_tag :arrival
= label_tag :departure
.date-field.input-field
= date_field_tag :arrival, @registration.arrival.strftime("%Y-%m-%d")
= date_field_tag :departure, @registration.departure.strftime("%Y-%m-%d")
%h3=_'articles.conference_registration.headings.housing','Do you need a place to stay?'
.radio-button-field.input-field
- [:none, :tent, :house].each do |option|
= radio_button_tag :housing, option, (@registration.housing || '').to_sym == option, required: true
= label_tag "housing_#{option}" do
- option_name = _"articles.conference_registration.questions.housing.#{option}"
= svg_sprite('icons', "bb-#{option}", option_name)
= option_name
%h3=_'articles.conference_registration.headings.bike','Do you need a bike?'
.radio-button-field.input-field
- [:none, :small, :medium, :large].each do |option|
= radio_button_tag :bike, option, (@registration.bike || '').to_sym == option, required: true
= label_tag "bike_#{option}" do
- option_name = _"articles.conference_registration.questions.bike.#{option}"
= svg_sprite('icons', "bb-#{option == :none ? :none : :bike}", option_name)
= option_name
%h3=_'articles.conference_registration.headings.other','Anything else we should know about your visit?'
.select-field.input-field
= label_tag :other
= text_area_tag :other, @registration.other
= button_tag :register, :value => :save
- when :workshops
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Workshops','Workshops'
= columns(medium: 6) do
%h3=_'articles.conference_registration.headings.Add_Workshop'
= form_tag register_path(@this_conference.slug) do
.text-field.input-field
= text_field_tag :title, nil, required: true
= label_tag :title
= text_area_tag :info, nil, required: true
= button_tag :add
= columns(medium: 6) do
%h3=_'articles.conference_registration.headings.Your_Workshops'
%ul.workshops.my-workshops
- @my_workshops.each do |workshop|
%li
%h4=workshop[:title]
.info
%h5{:contenteditable => true}=workshop[:title]
%p{:contenteditable => true}=workshop[:info]
= form_tag register_path(@this_conference.slug) do
= button_tag :save, :value => :save
= button_tag :delete, :value => :delete
= button_tag :cancel, :value => :cancel
= columns(medium: 12) do
= form_tag register_path(@this_conference.slug) do
= button_tag :previous, :value => :registration
= button_tag :next, :value => :workshops
:javascript
function makeWorkshopsClickable() {
var workshops = document.querySelectorAll('ul.workshops h4');
for (var i = 0; i < workshops.length; i++) {
workshops[i].addEventListener('click', function(e) {
var workshop = e.target.parentElement;
workshop.className = 'view';
workshop.querySelector('form').onsubmit = function() {
workshop.removeAttribute('class');
return false;
}
}, false);
}
}
makeWorkshopsClickable();
- else
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Enter_Your_Email','Enter your email address'
= columns(medium: 6, large: 7) do
%p=_'articles.conference_registration.paragraphs.confirm_email_address', :p
= columns(medium: 6, large: 5) do
= form_tag :do_confirm do
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= button_tag :register, :value => :register