Browse Source

Volunteer questions removed and primary merged with participant questions

development
Godwin 10 years ago
parent
commit
9c36cd5576
  1. 13
      app/controllers/conferences_controller.rb
  2. 10
      app/views/conferences/_register_questions.html.haml
  3. 6
      app/views/conferences/_register_thanks.html.haml
  4. 2
      config/routes.rb

13
app/controllers/conferences_controller.rb

@ -146,7 +146,7 @@ class ConferencesController < ApplicationController
session[:registration][:user][:lastname] = user ? user.lastname : nil session[:registration][:user][:lastname] = user ? user.lastname : nil
session[:registration][:user][:username] = user ? user.username : nil session[:registration][:user][:username] = user ? user.username : nil
end end
next_step = 'primary' next_step = 'questions'
end end
when 'primary' when 'primary'
if params[:firstname].blank? || params[:lastname].blank? if params[:firstname].blank? || params[:lastname].blank?
@ -283,6 +283,17 @@ class ConferencesController < ApplicationController
end end
end end
when 'questions' when 'questions'
if params[:firstname].blank? || params[:lastname].blank?
error = _'registration.register.no_name_error',"Oh, c'mon, please tell us your name. We promise not to share it with anyone, we just don't want to get you mixed up with someone else."
end
session[:registration][:user][:firstname] = params[:firstname]
session[:registration][:user][:lastname] = params[:lastname]
session[:registration][:is_volunteer] = false
session[:registration][:is_participant] = true
if !session[:registration][:user][:id]
session[:registration][:user][:username] = !error && params[:username].blank? ? (params[:firstname] + ' ' + params[:lastname]) : params[:username]
end
session[:registration][:questions] = params[:questions].deep_symbolize_keys session[:registration][:questions] = params[:questions].deep_symbolize_keys
session[:registration][:is_workshop_host] = !params[:is_workshop_host].to_i.zero? session[:registration][:is_workshop_host] = !params[:is_workshop_host].to_i.zero?
next_step = 'organizations' next_step = 'organizations'

10
app/views/conferences/_register_questions.html.haml

@ -1,4 +1,12 @@
%h3=_'registration.questions.title','Conference Participant Information' .columns
%h3=_'registration.questions.title','Attendance Questions'
.columns.medium-5.medium-offset-1
= text_field_tag :firstname, session[:registration][:user][:firstname], :required => true
.columns.medium-5.end
= text_field_tag :lastname, session[:registration][:user][:lastname], :required => true
.columns.medium-8.medium-offset-2.end
- if !session[:registration][:user][:id]
= text_field_tag :username, session[:registration][:user][:username]
.columns.medium-offset-1.end .columns.medium-offset-1.end
%h4=_'registration.questions.housing','Do you require housing?' %h4=_'registration.questions.housing','Do you require housing?'
%p.help=_'registration.questions.housing.help','We will do our best to accommodate everyone but we will be working on a first come, first serve basis. If we cannot accommodate your needs, we will do our best to let you know ahead of time.' %p.help=_'registration.questions.housing.help','We will do our best to accommodate everyone but we will be working on a first come, first serve basis. If we cannot accommodate your needs, we will do our best to let you know ahead of time.'

6
app/views/conferences/_register_thanks.html.haml

@ -30,6 +30,6 @@
%h3=_'registration.thanks.title','Thanks for submitting your registration' %h3=_'registration.thanks.title','Thanks for submitting your registration'
.columns .columns
%h4=_'registration.thanks.remember_to_confirm','Remember to confirm your registration upon receiving the confirmation email. If you need it to be resent, just press the button below.' %h4=_'registration.thanks.remember_to_confirm','Remember to confirm your registration upon receiving the confirmation email. If you need it to be resent, just press the button below.'
%p.help -# %p.help
=_'registration.thanks.remember_to_confirm.help','If you experience any technical issues, please contact Godwin directly at' -# =_'registration.thanks.remember_to_confirm.help','If you experience any technical issues, please contact Godwin directly at'
%a{href: 'mailto:goodgodwin@hotmail.com'}='goodgodwin@hotmail.com' -# %a{href: 'mailto:goodgodwin@hotmail.com'}='goodgodwin@hotmail.com'

2
config/routes.rb

@ -14,7 +14,7 @@ BikeBike::Application.routes.draw do
#resources :workshops, :param => 'slug' #resources :workshops, :param => 'slug'
#get :register, :param => 'step' #get :register, :param => 'step'
#post 'register/next' => 'conferences#register_submit' #post 'register/next' => 'conferences#register_submit'
get 'register/workshop-test/' => 'conferences#workshop_test' # get 'register/workshop-test/' => 'conferences#workshop_test'
match 'register(/:step)' => 'conferences#register', via: [:get, :post] match 'register(/:step)' => 'conferences#register', via: [:get, :post]
get 'register/confirm/:confirmation_token' => 'conferences#register_confirm' get 'register/confirm/:confirmation_token' => 'conferences#register_confirm'
match 'register/pay-registration/:confirmation_token' => 'conferences#register_pay_registration', via: [:get, :post] match 'register/pay-registration/:confirmation_token' => 'conferences#register_pay_registration', via: [:get, :post]

Loading…
Cancel
Save