Fix confirming of proposals

This commit is contained in:
Henne Vogelsang 2013-05-07 17:00:26 +02:00 committed by Henne Vogelsang
parent 39ca877e5e
commit 178e584730
3 changed files with 4 additions and 4 deletions

View file

@ -140,7 +140,7 @@ class ProposalController < ApplicationController
def confirm
if @event.transition_possible? :confirm
begin
@event.confirm!
@event.confirm!(:send_mail => params[:send_mail])
rescue Exception => e
redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => "Event was NOT confirmed: #{e.message}")
return

View file

@ -98,7 +98,7 @@ class Event < ActiveRecord::Base
self.class.state_machine.events_for(self.current_state).include?(transition)
end
def process_confirmation
def process_confirmation(options)
if self.conference.email_settings.send_on_confirmed_without_registration?
if self.conference.registrations.where(:person_id => self.submitter.id).first.nil?
Mailbot.confirm_reminder_mail(self).deliver
@ -171,4 +171,4 @@ class Event < ActiveRecord::Base
self.guid = guid
end
end
end

View file

@ -27,7 +27,7 @@
%td
.pull-right
- 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 !event.unconfirmed? && !event.confirmed?
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"