Registration working until workshops
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
- page_title = _'error.404.page_title.This_Page_Does_Not_Exist'
|
||||
- title page_title
|
||||
- banner_title page_title
|
||||
- content_for :banner do
|
||||
- image = image_url(@banner_image || '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.404.Page_Not_Found')
|
||||
|
||||
.row
|
||||
%h1
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.confirm_email','Please confirm your email address'
|
||||
= 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
|
||||
= hidden_field_tag :token, @confirmation.token
|
||||
= button_tag :login
|
||||
@@ -0,0 +1,5 @@
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.confirmation_sent','Confirmation Sent'
|
||||
= columns(medium: 6) do
|
||||
%p=_'articles.permission_denied.paragraphs.confirmation_sent', :p
|
||||
@@ -0,0 +1,9 @@
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.not_a_translator','Sorry you must be a translator to view this page'
|
||||
= columns(medium: 6) do
|
||||
%p=_'articles.permission_denied.paragraphs.translator_request', :p
|
||||
= columns(medium: 6) do
|
||||
= form_tag :translator_request do
|
||||
= text_area_tag :comment, nil, placeholder: true, required: true
|
||||
= button_tag :translator_request
|
||||
@@ -1,21 +1,11 @@
|
||||
= row do
|
||||
- if current_user
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.not_a_translator','Sorry you must be a translator to view this page'
|
||||
= columns(medium: 6) do
|
||||
%p=_'articles.permission_denied.paragraphs.translator_request', :p
|
||||
= columns(medium: 6) do
|
||||
= form_tag :translator_request do
|
||||
=text_area_tag :comment, nil, placeholder: true
|
||||
=button_tag :translator_request
|
||||
- else
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.login_required','Sorry you must be logged in to view this page'
|
||||
= columns(medium: 6) do
|
||||
%p=_'articles.permission_denied.paragraphs.translator_not_logged_in', :p
|
||||
= columns(medium: 6) do
|
||||
= form_tag :do_confirm do
|
||||
.email-field
|
||||
=email_field_tag :email, nil, required: true
|
||||
=label_tag :email
|
||||
=button_tag :login
|
||||
= columns(medium: 12) do
|
||||
%h2=_'articles.permission_denied.headings.login_required','Sorry you must be logged in to view this page'
|
||||
= columns(medium: 6, large: 7) do
|
||||
%p=_'articles.permission_denied.paragraphs.translator_not_logged_in', :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 :login
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
- content_for :banner do
|
||||
- image = image_url('403.jpg')
|
||||
- image = image_url(@banner_image || '403.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_titles.Permission_Denied'
|
||||
%h1=_(@page_title || 'page_titles.403.Permission_Denied')
|
||||
|
||||
%article
|
||||
- if @template
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
- 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
|
||||
@@ -36,6 +36,40 @@
|
||||
%footer= render 'shared/footer'
|
||||
- if content_for?(:footer_scripts)
|
||||
= yield :footer_scripts
|
||||
- if content_for?(:scripts) || content_for?(:dom_ready)
|
||||
:javascript
|
||||
#{content_for?(:scripts) ? "#{yield :scripts}" : ''}#{content_for?(:dom_ready) ? "$(function(){#{yield :dom_ready}});" : ''}
|
||||
-# if content_for?(:scripts) || content_for?(:dom_ready)
|
||||
-# #{content_for?(:scripts) ? "#{yield :scripts}" : ''}#{content_for?(:dom_ready) ? "$(function(){#{yield :dom_ready}});" : ''}
|
||||
:javascript
|
||||
(function() {
|
||||
if (!String.prototype.trim) {
|
||||
(function() {
|
||||
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
||||
String.prototype.trim = function() {
|
||||
return this.replace(rtrim, '');
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
function classExists(elem,className){var p = new RegExp('(^| )'+className+'( |$)');return (elem.className && elem.className.match(p));}
|
||||
function addClass(elem,className){if(classExists(elem,className)){return true;}elem.className += ' '+className;}
|
||||
function removeClass(elem,className){var c = elem.className;var p = new RegExp('(^| )'+className+'( |$)');c = c.replace(p,' ').replace(/ /g,' ');elem.className = c.trim();}
|
||||
|
||||
[].slice.call(document.querySelectorAll('.input-field input')).forEach(function(inputEl) {
|
||||
if (inputEl.value.trim() === '') {
|
||||
inputEl.parentNode.className = inputEl.parentNode.className + ' empty';
|
||||
}
|
||||
|
||||
inputEl.addEventListener('focus', onInputFocus);
|
||||
inputEl.addEventListener('blur', onInputBlur);
|
||||
});
|
||||
|
||||
function onInputFocus(ev) {
|
||||
removeClass(ev.target.parentNode, 'empty')
|
||||
}
|
||||
|
||||
function onInputBlur(ev) {
|
||||
if (ev.target.value.trim() === '') {
|
||||
addClass(ev.target.parentNode, 'empty');
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
@@ -7,4 +7,13 @@
|
||||
= nav_link '/about', (_'page_titles.About_BikeBike')
|
||||
= nav_link '/policy', (_'page_titles.Safe_Space_Policy')
|
||||
.actions
|
||||
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
|
||||
- if current_user
|
||||
= form_tag :logout, class: :logout do
|
||||
=hidden_field_tag :url, request.fullpath
|
||||
=button_tag :Log_out
|
||||
- elsif @conference.registration_open
|
||||
- if params[:action] != 'register'
|
||||
= link_to register_path(@conference.slug), class: [:button, :register] do
|
||||
=_'conference.actions.Register'
|
||||
- else
|
||||
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
|
||||
@@ -0,0 +1 @@
|
||||
%a{href: "#{@host}/confirm/#{@confirmation.token}"}=_'email.confirm.confirm_link'
|
||||
Reference in New Issue
Block a user