New registration completed and tested

This commit is contained in:
Godwin
2017-06-03 12:55:13 -07:00
parent 6eddbe0a69
commit eed9bd8b40
21 changed files with 763 additions and 1009 deletions
+30 -1
View File
@@ -715,10 +715,39 @@ button,
}
}
ul.menu {
list-style: none;
margin-top: 0;
padding-left: 0;
li {
display: inline;
padding: 0;
@include after {
content: '|';
margin: 0 0.333em 0 0.5em;
}
&:last-child {
@include after {
display: none;
}
}
}
}
.back-to {
float: left;
margin-right: 0.5em;
font-size: 1.2em;
@include font-family(secondary);
}
#action-message {
display: none;
text-align: center;
margin-bottom: 1em;
margin-bottom: 3em;
&.error, &.complete, &.warning {
display: block;
+2 -6
View File
@@ -79,14 +79,10 @@ class ConferencesController < ApplicationController
end
end
view_context.add_stylesheet 'quill.css'
view_context.add_javascript :quill
view_context.add_inline_script :editor
# get the current step
@step = current_registration_step(@this_conference, current_user)
if @step == :payment_form && params[:token].present?
if @step == :payment_form && (params[:token].present? || @test_token.present?)
result = paypal_payment_confirm(@this_conference, current_user, params)
data_to_instance_variables(result)
@confirm_payment = true
@@ -101,7 +97,7 @@ class ConferencesController < ApplicationController
if request.xhr?
render json: [{
globalSelector: '#step-content',
html: render_to_string(partial: "registration_steps/#{@step}"),
html: view_context.step_message + render_to_string(partial: "registration_steps/#{@step}"),
scrollTo: '#action-message .message, #step-content'
}]
end
+12 -9
View File
@@ -129,22 +129,25 @@ module RegistrationHelper
end
end
message = if @update_message.present? && @update_status.present?
columns(medium: 12, class: @update_status, id: 'action-message') do
content_tag(:div, (_"articles.conference_registration.#{@update_status}.#{@update_message}", :s), class: :message).html_safe
end
else
''
end
actions = columns(medium: 12, class: [:actions, :center]) do
content_tag(:div, actions.html_safe, class: :buttons).html_safe
end
form_tag(register_path(conference.slug), class: 'js-xhr') do
message.html_safe +
form_tag(register_path(conference.slug), class: @no_ajax ? nil : 'js-xhr') do
content.html_safe +
(hidden_field_tag :step, step).html_safe +
actions.html_safe
end.html_safe
end
def step_message
if @update_message.present? && @update_status.present?
return row do
columns(medium: 12, class: @update_status, id: 'action-message') do
content_tag(:div, (_"articles.conference_registration.#{@update_status}.#{@update_message}", :s), class: :message).html_safe
end.html_safe
end.html_safe
end
return ''
end
end
+1 -2
View File
@@ -1,3 +1,2 @@
- @main_title_t ||= (@this_conference.title)
-# @page_title ||= (@this_conference.title)
- @main_title_t ||= _!(@this_conference.title)
= render partial: 'application/header', locals: { page_group: :conferences, page_key: page_key, image_file: @this_conference.poster_url }
+13 -1
View File
@@ -6,8 +6,20 @@
= warning
%article
- if logged_in?
#step-content= render "registration_steps/#{@step}"
- add_stylesheet 'quill.css'
- add_javascript :quill
- add_inline_script :editor
#step-content
= step_message
= render "registration_steps/#{@step}"
- else
= row do
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Registration_Details'
%p= _'articles.conference_registration.paragraphs.Registration_Details'
%h3=_'articles.conference_registration.headings.Verify_Account'
%p=_'articles.conference_registration.paragraphs.Verify_Account'
= row do
= columns(medium: 12) do
= render "application/login"
@@ -0,0 +1,16 @@
= row do
= columns(medium: 12) do
= registration_step_header_title
- if @info.present?
= @info
- else
= registration_step_header_description
= row do
= columns(medium: 12) do
= save_registration_step do
.registration-step-options
.options
- [:yes, :maybe, :no].each do |option|
- class_name = [:unstyled]
- class_name << :selected if @will_attend == option
= button option, value: option, class: class_name
@@ -15,7 +15,10 @@
= radiobuttons :currency, (@currencies.map { |c| [(_"currencies.#{c}.displayName-count-other"), c] }), @currency
.options.graded-options{class: "option-count-#{@amounts.size}"}
- @amounts.each_with_index do |option, i|
= button (number_to_currency option, unit: '$'), value: option, name: :value, class: [:unstyled, "option-#{i + 1}"], data: { noxhr: 1 }
= button (number_to_currency option, unit: '$'), value: option, name: :value, class: [:unstyled, "option-#{i + 1}"]
.custom-option
-# if Rails.env.test?
=# text_field_tag :custom_value, nil
-# else
= number_field_tag :custom_value, 50.0, step: 0.05, min: 0.05
= button :custom_amount, name: :custom_amount, value: :custom, class: :unstyled, data: { noxhr: 1 }
= button :custom_amount, name: :custom_amount, value: :custom, class: :unstyled
@@ -26,7 +26,10 @@
- when :html
.scroller= richtext(data[:value].html_safe)
- else
= data[:value]
- if data[:key].present?
=_"#{data[:key]}.#{data[:value]}"
- else
= data[:value]
- else
%p.centered=_'articles.conference_registration.paragraphs.registration_cancelled', :p
- if @allow_cancel_attendance
+5
View File
@@ -1,6 +1,11 @@
= render 'conferences/page_header', page_key: 'Workshops'
%article
= row do
= columns(medium: 12) do
.back-to=_'articles.conference_registration.headings.Back_to'
%ul.menu
%li=link_to (_'articles.conference_registration.headings.Your_Registration'), :register
= row do
= columns(medium: 12) do
%h2=_'articles.workshops.headings.Workshops'
+7 -1
View File
@@ -1,7 +1,13 @@
= render 'conferences/page_header', page_key: 'Conference_Registration'
%article
= render 'workshops/show', :workshop => @workshop, :translations_available_for_editing => @translations_available_for_editing, :preview => false
= row do
= columns(medium: 12) do
.back-to=_'articles.conference_registration.headings.Back_to'
%ul.menu
%li=link_to (_'articles.conference_registration.headings.Workshops'), :workshops
%li=link_to (_'articles.conference_registration.headings.Your_Registration'), :register
= render 'workshops/show', workshop: @workshop, translations_available_for_editing: @translations_available_for_editing, preview: false
= row do
= columns(medium: 12) do
.actions.next-prev