Browse Source

Initial work on questions and payment and fix for confirmation email

development
Godwin 8 years ago
parent
commit
62f94b1ecd
  1. 35
      app/assets/stylesheets/_application.scss
  2. 2
      app/controllers/application_controller.rb
  3. 10
      app/controllers/conferences_controller.rb
  4. 1
      app/helpers/application_helper.rb
  5. 2
      app/views/conferences/_hosting.html.haml
  6. 4
      app/views/conferences/_payment.html.haml
  7. 7
      app/views/conferences/_questions.html.haml
  8. 11
      config/locales/en.yml
  9. 10
      config/locales/es.yml

35
app/assets/stylesheets/_application.scss

@ -605,10 +605,10 @@ input {
content: '+'; content: '+';
border: 0; border: 0;
font-size: 2.5em; font-size: 2.5em;
top: 0;//-0.25em; // top: 0;//-0.25em;
left: 0.175em; // left: 0.175em;
// top: -0.125em; top: -0.15em;
// left: 0.05em; left: 0.05em;
line-height: 1em; line-height: 1em;
color: #FFF; color: #FFF;
height: 1em; height: 1em;
@ -741,6 +741,10 @@ form {
height: 2.6em; height: 2.6em;
} }
} }
&.centered {
text-align: center;
}
} }
#main .columns th form { #main .columns th form {
@ -1158,6 +1162,10 @@ ul.warnings li,
} }
} }
.clearfix {
@include clearfix;
}
.flow-steps { .flow-steps {
ul { ul {
display: block; display: block;
@ -2281,29 +2289,34 @@ html :focus {
} }
} }
#main form.payment { #main form.custom-payment {
text-align: center; // text-align: center;
input[type="number"] { input[type="number"] {
margin-top: 1em; /*margin-top: 1em;
font-size: 1.5em; font-size: 1.5em;
text-align: center; text-align: center;
width: 4em;
height: 1.9em; height: 1.9em;
border: 0; border: 0;
@include default-box-shadow(top); @include default-box-shadow(top);
background-color: $black; background-color: $black;
color: $colour-3; color: $colour-3;
vertical-align: bottom; vertical-align: bottom;*/
width: 4em;
margin-right: 0.5em;
} }
> button { button {
background-color: $colour-1; background-color: $colour-1;
} }
.currency { .currency {
color: #888; color: #888;
font-size: 1.667em; font-size: 1.5em;
}
.number-field {
margin-bottom: 0;
} }
} }

2
app/controllers/application_controller.rb

@ -235,7 +235,7 @@ class ApplicationController < LinguaFrancaApplicationController
end end
expiry ||= (Time.now + 12.hours) expiry ||= (Time.now + 12.hours)
session[:confirm_uid] = user.id session[:confirm_uid] = user.id
UserMailer.send_mail :email_confirmation do UserMailer.send_mail! :email_confirmation do
EmailConfirmation.create(user_id: user.id, expiry: expiry, url: url) EmailConfirmation.create(user_id: user.id, expiry: expiry, url: url)
end end
end end

10
app/controllers/conferences_controller.rb

@ -2109,7 +2109,15 @@ class ConferencesController < ApplicationController
] ]
steps -= [:questions, :payment] unless status == :open steps -= [:questions, :payment] unless status == :open
steps -= [:hosting] unless @registration.present? && view_context.same_city?(@registration.city, @conference.location) if @registration.present?
if view_context.same_city?(@registration.city, @conference.location)
steps -= [:questions]
else
steps -= [:hosting]
end
else
steps -= [:hosting, :questions]
end
steps -= [:administration] unless @registration.present? && @conference.host?(current_user) steps -= [:administration] unless @registration.present? && @conference.host?(current_user)

1
app/helpers/application_helper.rb

@ -1112,6 +1112,7 @@ module ApplicationHelper
lang: options[:lang], lang: options[:lang],
min: options[:min], min: options[:min],
max: options[:max], max: options[:max],
step: options[:step],
aria: description_id ? { describedby: description_id } : nil aria: description_id ? { describedby: description_id } : nil
} }

2
app/views/conferences/_hosting.html.haml

@ -13,7 +13,7 @@
= selectfield :first_day, @hosting_data['availability'][0] || @this_conference.start_date, conference_days_options_list(:before) = selectfield :first_day, @hosting_data['availability'][0] || @this_conference.start_date, conference_days_options_list(:before)
= selectfield :last_day, @hosting_data['availability'][1] || @this_conference.start_date, conference_days_options_list(:after) = selectfield :last_day, @hosting_data['availability'][1] || @this_conference.start_date, conference_days_options_list(:after)
= checkboxes :considerations, [:vegan, :smoking, :pets, :quiet], @hosting_data['considerations'], 'articles.conference_registration.host.considerations', heading: 'articles.conference_registration.headings.host.considerations', help: 'articles.conference_registration.paragraphs.host.considerations', vertical: true = checkboxes :considerations, [:vegan, :smoking, :pets, :quiet], @hosting_data['considerations'], 'articles.conference_registration.host.considerations', heading: 'articles.conference_registration.headings.host.considerations', help: 'articles.conference_registration.paragraphs.host.considerations', vertical: true
= textarea :notes, @hosting_data['notes'], heading: 'articles.conference_registration.headings.host.notes', help: 'articles.conference_registration.paragraphs.host.notes', edit_on: :focus = textarea :notes, @hosting_data['notes'], help: 'articles.conference_registration.paragraphs.host.notes', edit_on: :focus
.actions.next-prev .actions.next-prev
= button_tag (params[:step] == :save ? :save : :next), value: :hosting = button_tag (params[:step] == :save ? :save : :next), value: :hosting
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true = button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true

4
app/views/conferences/_payment.html.haml

@ -11,9 +11,9 @@
=_! '$50.00' =_! '$50.00'
= button_tag :amount_100, :name => :amount, :value => '100.0' do = button_tag :amount_100, :name => :amount, :value => '100.0' do
= _!'$100.00' = _!'$100.00'
= form_tag register_path(@this_conference.slug), :class => :payment do = form_tag register_path(@this_conference.slug), :class => ['custom-payment', :centered] do
%span.currency=_!'$' %span.currency=_!'$'
= number_field_tag :amount, nil, :required => true, :step => 0.01, :min => 0.00 = numberfield :amount, nil, :required => true, :step => 0.01, :min => 0.00, label: false
= button_tag :custom_amount, :value => :payment = button_tag :custom_amount, :value => :payment
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)' %p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
= form_tag register_path(@this_conference.slug), :class => :payment do = form_tag register_path(@this_conference.slug), :class => :payment do

7
app/views/conferences/_questions.html.haml

@ -1,10 +1,13 @@
= columns(medium: 12) do = columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Registration_Info' %h2=_'articles.conference_registration.headings.Registration_Info'
= columns(medium: 12) do = columns(medium: 12) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p %p=_'articles.conference_registration.paragraphs.Registration_Info', :p, vars: { city: @this_conference.location.city }
= form_tag register_path(@this_conference.slug) do = form_tag register_path(@this_conference.slug), class: [:centered, :clearfix] do
= columns(medium: 12) do = columns(medium: 12) do
= radiobuttons :housing, ConferenceRegistration.all_housing_options, @registration.housing, 'articles.conference_registration.questions.housing', heading: 'articles.conference_registration.headings.housing', vertical: true, big: true, inline: true = radiobuttons :housing, ConferenceRegistration.all_housing_options, @registration.housing, 'articles.conference_registration.questions.housing', heading: 'articles.conference_registration.headings.housing', vertical: true, big: true, inline: true
= fieldset :hosting_dates, heading: 'articles.conference_registration.headings.arrival_and_departure' do
= selectfield :arrival, @registration.arrival || @this_conference.start_date, conference_days_options_list(:before)
= selectfield :departure, @registration.departure || @this_conference.start_date, conference_days_options_list(:after)
= radiobuttons :bike, ConferenceRegistration.all_bike_options, @registration.bike, 'articles.conference_registration.questions.bike', heading: 'articles.conference_registration.headings.bike', inline: true, big: true = radiobuttons :bike, ConferenceRegistration.all_bike_options, @registration.bike, 'articles.conference_registration.questions.bike', heading: 'articles.conference_registration.headings.bike', inline: true, big: true
= radiobuttons :food, ConferenceRegistration.all_food_options, @registration.food, 'articles.conference_registration.questions.food', heading: 'articles.conference_registration.headings.food', inline: true, big: true = radiobuttons :food, ConferenceRegistration.all_food_options, @registration.food, 'articles.conference_registration.questions.food', heading: 'articles.conference_registration.headings.food', inline: true, big: true
= columns(medium: 12) do = columns(medium: 12) do

11
config/locales/en.yml

@ -5366,7 +5366,7 @@ en:
location: Where are you coming from? location: Where are you coming from?
name: What is your name? name: What is your name?
Payment: Payment Payment: Payment
payment: Fees paid payment: Payment
Allergies: Allergies Allergies: Allergies
Stats: Stats Stats: Stats
Workshops: Workshops Workshops: Workshops
@ -5393,19 +5393,20 @@ en:
space: Available Space space: Available Space
availability: Availability availability: Availability
address: Address address: Address
notes: Notes
paragraphs: paragraphs:
Policy_Agreement: Ensuring that all attendees feel welcome, safe, and respected at all times is especially important to us all. Please ensure that you have fully read and understand our safer spaces policy below, if you have any questions or concerns you can reach out to the organizers at any time. Policy_Agreement: Ensuring that all attendees feel welcome, safe, and respected at all times is especially important to us all. Please ensure that you have fully read and understand our safer spaces policy below, if you have any questions or concerns you can reach out to the organizers at any time.
Confirm_Agreement: By clicking the "I Agree" button, you are pledging to do Confirm_Agreement: By clicking the "I Agree" button, you are pledging to do
your best to uphold Bike!Bike!'s safer space agreement. Thank you! your best to uphold Bike!Bike!'s safer space agreement. Thank you!
Registration_Info: Please fill in this registration form to help us prepare Registration_Info: Please fill in this registration form to help us prepare
for your arrival to Guadalajara. If you wish to ask questions or tell us for your arrival to %{city}. If you wish to ask questions or tell us
information we did not ask, please fill in the "More Info" field at the information we did not ask, please fill in the preferences field at the
bottom of the page. bottom of the page or use the contact us link.
Payment: Thank you for completing your registration. We'll see you at Bike!Bike! 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 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 fund the conference, we ask that you pay the registration donation as soon
as you can. as you can.
currency: "(amounts are in $USD)" currency: "(amounts are in USD)"
email_confirm: Go to your inbox! You should see an email from Bike!Bike! in email_confirm: Go to your inbox! You should see an email from Bike!Bike! in
just a few moments. There will be a link in the email for you to click on. just a few moments. There will be a link in the email for you to click on.
Check your spam box if you do not see it. If you encounter any problems, Check your spam box if you do not see it. If you encounter any problems,

10
config/locales/es.yml

@ -729,7 +729,7 @@ es:
email_confirm: Confirmar correo electrónico email_confirm: Confirmar correo electrónico
housing: ¿Necesitas hospedaje? housing: ¿Necesitas hospedaje?
other: ¿Hay algo más que quisieras decirnos? other: ¿Hay algo más que quisieras decirnos?
payment: Cargos pagados payment: Pago
payment_confirm: Por favor confirma tu pago payment_confirm: Por favor confirma tu pago
city: Ciudad city: Ciudad
date: Fecha date: Fecha
@ -737,9 +737,9 @@ es:
fees_paid: Cargos pagados fees_paid: Cargos pagados
paragraphs: paragraphs:
Registration_Info: Por favor llena esta forma de registro para ayudarnos a Registration_Info: Por favor llena esta forma de registro para ayudarnos a
prepararnos para tu llegada a Guadalajara. Si tienes alguna pregunta o información prepararnos para tu llegada a %{city}. Si tienes alguna pregunta o información
que no te hayamos pedido por favor llena el campo "Más información" al final que no te hayamos pedido por favor llena el campo preferencias al final
de la página. de la página o utilice el enlace contáctenos.
Payment: Las y los esperamos del 1 al 4 de octubre del 2015.Más información Payment: Las y los esperamos del 1 al 4 de octubre del 2015.Más información
en: bikebike@gdlenbici.org en: bikebike@gdlenbici.org
Workshops: 'Título de la actividad: Que necesitas? Tipo de espacio? Tema? Workshops: 'Título de la actividad: Que necesitas? Tipo de espacio? Tema?
@ -756,7 +756,7 @@ es:
al ser confirmada podrás completar el registro, agregar talleres y pagar al ser confirmada podrás completar el registro, agregar talleres y pagar
el donativo de registro. Si ya te registraste puedes re-confirmar tu dirección el donativo de registro. Si ya te registraste puedes re-confirmar tu dirección
de e-mail para modificar los detalles de tu registro. de e-mail para modificar los detalles de tu registro.
currency: (cantidades en dólares americanos $USD) currency: (cantidades en dólares americanos USD)
done: ¡Gracias por registrarte para Bike!Bike! done: ¡Gracias por registrarte para Bike!Bike!
email_confirm: ¡Ve a tu bandeja de entrada! Deberías ver un e-mail por parte email_confirm: ¡Ve a tu bandeja de entrada! Deberías ver un e-mail por parte
de Bike!Bike! en unos momentos. Contendrá un enlace sobre el cual debes de Bike!Bike! en unos momentos. Contendrá un enlace sobre el cual debes

Loading…
Cancel
Save