Fix confirming of proposals
This commit is contained in:
parent
39ca877e5e
commit
178e584730
3 changed files with 4 additions and 4 deletions
|
|
@ -140,7 +140,7 @@ class ProposalController < ApplicationController
|
||||||
def confirm
|
def confirm
|
||||||
if @event.transition_possible? :confirm
|
if @event.transition_possible? :confirm
|
||||||
begin
|
begin
|
||||||
@event.confirm!
|
@event.confirm!(:send_mail => params[:send_mail])
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => "Event was NOT confirmed: #{e.message}")
|
redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => "Event was NOT confirmed: #{e.message}")
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class Event < ActiveRecord::Base
|
||||||
self.class.state_machine.events_for(self.current_state).include?(transition)
|
self.class.state_machine.events_for(self.current_state).include?(transition)
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_confirmation
|
def process_confirmation(options)
|
||||||
if self.conference.email_settings.send_on_confirmed_without_registration?
|
if self.conference.email_settings.send_on_confirmed_without_registration?
|
||||||
if self.conference.registrations.where(:person_id => self.submitter.id).first.nil?
|
if self.conference.registrations.where(:person_id => self.submitter.id).first.nil?
|
||||||
Mailbot.confirm_reminder_mail(self).deliver
|
Mailbot.confirm_reminder_mail(self).deliver
|
||||||
|
|
@ -171,4 +171,4 @@ class Event < ActiveRecord::Base
|
||||||
self.guid = guid
|
self.guid = guid
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
%td
|
%td
|
||||||
.pull-right
|
.pull-right
|
||||||
- if event.transition_possible? :confirm
|
- if event.transition_possible? :confirm
|
||||||
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event), :method => :put, :class => "btn btn-mini btn-success"
|
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event, :send_mail=>false), :method => :put, :class => "btn btn-mini btn-success"
|
||||||
- if @conference.cfp_open?
|
- if @conference.cfp_open?
|
||||||
- if !event.unconfirmed? && !event.confirmed?
|
- if !event.unconfirmed? && !event.confirmed?
|
||||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue