Allowing registration to be access but not modified after registration is closed
This commit is contained in:
@@ -517,16 +517,20 @@ class ConferencesController < ApplicationController
|
||||
is_post = request.post? || session[:registration_step]
|
||||
set_conference
|
||||
|
||||
if !@this_conference.registration_open
|
||||
do_404
|
||||
return
|
||||
end
|
||||
#if !@this_conference.registration_open
|
||||
# do_404
|
||||
# return
|
||||
#end
|
||||
|
||||
set_conference_registration
|
||||
|
||||
@register_template = nil
|
||||
|
||||
if logged_in?
|
||||
unless @this_conference.registration_open || @registration
|
||||
do_404
|
||||
return
|
||||
end
|
||||
# if the user is logged in start them off on the policy
|
||||
# page, unless they have already begun registration then
|
||||
# start them off with questions
|
||||
@@ -650,6 +654,11 @@ class ConferencesController < ApplicationController
|
||||
@register_template = :done
|
||||
end
|
||||
|
||||
# don't let the user edit registration if registration is closed
|
||||
if !@conference.registration_open && @register_template == :questions
|
||||
@register_template = :done
|
||||
end
|
||||
|
||||
# prepare data for the next view
|
||||
case @register_template
|
||||
when :questions
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
%tr
|
||||
%th=_'articles.conference_registration.headings.payment'
|
||||
%td=_!('$' + (@amount || 0))
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions
|
||||
= button_tag :edit_registration, :value => :register
|
||||
- if @conference.registration_open
|
||||
= form_tag register_path(@this_conference.slug) do
|
||||
.actions
|
||||
= button_tag :edit_registration, :value => :register
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- # encoding: utf-8
|
||||
%ul.workshop-previews
|
||||
- workshops.each do |w|
|
||||
- workshops.sort_by{ |w| w.title.downcase }.each do |w|
|
||||
- if w.title
|
||||
%li
|
||||
=link_to view_workshop_path(@this_conference.slug, w.id) do
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
= columns(medium: 6) do
|
||||
%h3=_'articles.workshops.headings.Your_Workshops'
|
||||
= render 'workshops/workshop_previews', :workshops => @my_workshops
|
||||
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify]
|
||||
= link_to (_'actions.workshops.create','New Workshop'), create_workshop_path(@this_conference.slug), class: [:button, :modify] if @conference.registration_open
|
||||
= row do
|
||||
= render 'workshops/workshop_previews', :workshops => @workshops
|
||||
Reference in New Issue
Block a user