From 1aa1efefad2d93d16a46d4c33f3048ba2735fed9 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 29 Sep 2016 10:16:03 -0400 Subject: [PATCH] CRM-19429 - CiviEvent: don't imply participant status always sends emails --- CRM/Event/Form/Task/Batch.php | 6 ++---- CRM/Event/Task.php | 2 +- templates/CRM/Event/Form/Task/Batch.tpl | 10 +++++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CRM/Event/Form/Task/Batch.php b/CRM/Event/Form/Task/Batch.php index 2a5965be2c..de821255b8 100644 --- a/CRM/Event/Form/Task/Batch.php +++ b/CRM/Event/Form/Task/Batch.php @@ -521,12 +521,10 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task { public function assignToTemplate() { $notifyingStatuses = array('Pending from waitlist', 'Pending from approval', 'Expired', 'Cancelled'); $notifyingStatuses = array_intersect($notifyingStatuses, CRM_Event_PseudoConstant::participantStatus()); - $statuses = implode(', ', $notifyingStatuses); - $status = ts('Participants whose status is changed FROM Pending Pay Later TO Registered or Attended will receive a confirmation email and their payment status will be set to completed. If this is not you want to do, you can change their participant status by editing their event registration record directly.'); + $this->assign('status', TRUE); if (!empty($notifyingStatuses)) { - $status .= '
' . ts("Participants whose status is changed TO any of the following will be automatically notified via email: %1", array(1 => $statuses)); + $this->assign('notifyingStatuses', implode(', ', $notifyingStatuses)); } - $this->assign('status', $status); } } diff --git a/CRM/Event/Task.php b/CRM/Event/Task.php index 683bd46039..6edac6ecfd 100644 --- a/CRM/Event/Task.php +++ b/CRM/Event/Task.php @@ -116,7 +116,7 @@ class CRM_Event_Task { 'result' => TRUE, ), 15 => array( - 'title' => ts('Participant status - change (emails sent)'), + 'title' => ts('Participant status - change'), 'class' => 'CRM_Event_Form_Task_ParticipantStatus', 'result' => TRUE, ), diff --git a/templates/CRM/Event/Form/Task/Batch.tpl b/templates/CRM/Event/Form/Task/Batch.tpl index 313cceb98c..969c77205e 100644 --- a/templates/CRM/Event/Form/Task/Batch.tpl +++ b/templates/CRM/Event/Form/Task/Batch.tpl @@ -29,7 +29,15 @@ {if $context EQ 'statusChange'} {* Update Participant Status task *} {ts}Update the status for each participant individually, OR change all statuses to:{/ts} {$form.status_change.html} {help id="id-status_change"} -
{$status}
+ {if $status} +
+ {ts}Participants whose status is changed FROM Pending Pay Later TO Registered or Attended will receive a confirmation email and their payment status will be set to completed. If this is not you want to do, you can change their participant status by editing their event registration record directly.{/ts} + {if $notifyingStatuses} +
+ {ts 1=$notifyingStatuses}Participants whose status is changed TO any of the following will be automatically notified via email: %1{/ts} + {/if} +
+ {/if} {else} {if $statusProfile EQ 1} {* Update Participant Status in batch task *}
{$status}
-- 2.25.1