mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 12:14:03 +00:00
Bugfix send accept / reject event mail
This commit is contained in:
parent
05392701a9
commit
0db2f3bb06
2 changed files with 19 additions and 18 deletions
|
|
@ -132,14 +132,15 @@ class Event < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def process_acceptance(options)
|
||||
if options[:send_mail] == "true"
|
||||
Rails.logger.debug "Sending acceptance mail"
|
||||
Mailbot.acceptance_mail(self).deliver
|
||||
if self.conference.email_settings.send_on_accepted && options[:send_mail].blank?
|
||||
Rails.logger.debug 'Sending event acceptance mail'
|
||||
Mailbot.acceptance_mail(self).deliver
|
||||
end
|
||||
end
|
||||
|
||||
def process_rejection(options)
|
||||
if options[:send_mail] == "true"
|
||||
if self.conference.email_settings.send_on_rejected && options[:send_mail].blank?
|
||||
Rails.logger.debug 'Sending rejected mail'
|
||||
Mailbot.rejection_mail(self).deliver
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -106,21 +106,21 @@
|
|||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- if event.transition_possible? :accept
|
||||
%li= link_to 'Accept event (no email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
|
||||
method: :patch, hint: 'Accept this event without sending an automated email.'
|
||||
%li= link_to 'Accept event (WITH email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: true),
|
||||
method: :patch, hint: 'Accept this event and send an automated email.'
|
||||
%li= link_to 'Accept event',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept),
|
||||
method: :patch
|
||||
- if @conference.email_settings.send_on_accepted?
|
||||
%li= link_to 'Accept event (without email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
|
||||
method: :patch, hint: 'Accept this event without sending an automated email.'
|
||||
- if event.transition_possible? :reject
|
||||
%li= link_to 'Reject event (no email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
|
||||
method: :patch, confirm: 'Are you sure?',
|
||||
hint: 'Reject this event without sending an automated email.'
|
||||
%li= link_to 'Reject event (WITH email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: true),
|
||||
method: :patch, confirm: 'Are you sure?',
|
||||
hint: 'Reject this event and send an automated email.'
|
||||
%li= link_to 'Reject event',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject),
|
||||
method: :patch, confirm: 'Are you sure?'
|
||||
- if @conference.email_settings.send_on_rejected?
|
||||
%li= link_to 'Reject event (without email)',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
|
||||
method: :patch, confirm: 'Are you sure?'
|
||||
- if event.transition_possible? :start_review
|
||||
%li= link_to 'Start review',
|
||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue