diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 06f9daa..493c915 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -146,7 +146,7 @@ class ConferencesController < ApplicationController session[:registration][:user][:lastname] = user ? user.lastname : nil session[:registration][:user][:username] = user ? user.username : nil end - next_step = 'primary' + next_step = 'questions' end when 'primary' if params[:firstname].blank? || params[:lastname].blank? @@ -283,6 +283,17 @@ class ConferencesController < ApplicationController end end 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][:is_workshop_host] = !params[:is_workshop_host].to_i.zero? next_step = 'organizations' diff --git a/app/views/conferences/_register_questions.html.haml b/app/views/conferences/_register_questions.html.haml index 2bbc073..3f278dc 100644 --- a/app/views/conferences/_register_questions.html.haml +++ b/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 %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.' diff --git a/app/views/conferences/_register_thanks.html.haml b/app/views/conferences/_register_thanks.html.haml index b2f9518..07e044a 100644 --- a/app/views/conferences/_register_thanks.html.haml +++ b/app/views/conferences/_register_thanks.html.haml @@ -30,6 +30,6 @@ %h3=_'registration.thanks.title','Thanks for submitting your registration' .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.' -%p.help - =_'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' +-# %p.help +-# =_'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' diff --git a/config/routes.rb b/config/routes.rb index 0464de4..1a1b7a7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,7 +14,7 @@ BikeBike::Application.routes.draw do #resources :workshops, :param => 'slug' #get :register, :param => 'step' #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] get 'register/confirm/:confirmation_token' => 'conferences#register_confirm' match 'register/pay-registration/:confirmation_token' => 'conferences#register_pay_registration', via: [:get, :post]