Initial work on questions and payment and fix for confirmation email

This commit is contained in:
Godwin
2016-07-14 16:54:32 -07:00
parent 3f97da2aab
commit 62f94b1ecd
9 changed files with 54 additions and 28 deletions
+24 -11
View File
@@ -605,10 +605,10 @@ input {
content: '+';
border: 0;
font-size: 2.5em;
top: 0;//-0.25em;
left: 0.175em;
// top: -0.125em;
// left: 0.05em;
// top: 0;//-0.25em;
// left: 0.175em;
top: -0.15em;
left: 0.05em;
line-height: 1em;
color: #FFF;
height: 1em;
@@ -741,6 +741,10 @@ form {
height: 2.6em;
}
}
&.centered {
text-align: center;
}
}
#main .columns th form {
@@ -1158,6 +1162,10 @@ ul.warnings li,
}
}
.clearfix {
@include clearfix;
}
.flow-steps {
ul {
display: block;
@@ -2281,29 +2289,34 @@ html :focus {
}
}
#main form.payment {
text-align: center;
#main form.custom-payment {
// text-align: center;
input[type="number"] {
margin-top: 1em;
/*margin-top: 1em;
font-size: 1.5em;
text-align: center;
width: 4em;
height: 1.9em;
border: 0;
@include default-box-shadow(top);
background-color: $black;
color: $colour-3;
vertical-align: bottom;
vertical-align: bottom;*/
width: 4em;
margin-right: 0.5em;
}
> button {
button {
background-color: $colour-1;
}
.currency {
color: #888;
font-size: 1.667em;
font-size: 1.5em;
}
.number-field {
margin-bottom: 0;
}
}
+1 -1
View File
@@ -235,7 +235,7 @@ class ApplicationController < LinguaFrancaApplicationController
end
expiry ||= (Time.now + 12.hours)
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)
end
end
+9 -1
View File
@@ -2109,7 +2109,15 @@ class ConferencesController < ApplicationController
]
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)
+1
View File
@@ -1112,6 +1112,7 @@ module ApplicationHelper
lang: options[:lang],
min: options[:min],
max: options[:max],
step: options[:step],
aria: description_id ? { describedby: description_id } : nil
}
+1 -1
View File
@@ -13,7 +13,7 @@
= 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)
= 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
= button_tag (params[:step] == :save ? :save : :next), value: :hosting
= button_tag :previous, value: :prev_contact_info, class: :subdued, formnovalidate: true
+2 -2
View File
@@ -11,9 +11,9 @@
=_! '$50.00'
= button_tag :amount_100, :name => :amount, :value => '100.0' do
= _!'$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=_!'$'
= 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
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
= form_tag register_path(@this_conference.slug), :class => :payment do
+5 -2
View File
@@ -1,10 +1,13 @@
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Registration_Info'
= columns(medium: 12) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p
= form_tag register_path(@this_conference.slug) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p, vars: { city: @this_conference.location.city }
= form_tag register_path(@this_conference.slug), class: [:centered, :clearfix] 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
= 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 :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