CRM-19429 - CiviEvent: don't imply participant status always sends emails
authorAndrew Hunt <andrew@aghstrategies.com>
Thu, 29 Sep 2016 14:16:03 +0000 (10:16 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Thu, 29 Sep 2016 14:16:03 +0000 (10:16 -0400)
CRM/Event/Form/Task/Batch.php
CRM/Event/Task.php
templates/CRM/Event/Form/Task/Batch.tpl

index 2a5965be2ccbe60e3cc30f36d9263d881542048d..de821255b84312074c352e22c852d9bf221cfa88 100644 (file)
@@ -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 .= '<br />' . 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);
   }
 
 }
index 683bd46039e588ffcdcda95fb1b32f6c47bb475b..6edac6ecfdefddb5bdc2b79eac11dc25d516a0e5 100644 (file)
@@ -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,
         ),
index 313cceb98cca0cd916bc0c3cbbbb971af9601a3c..969c77205ef633b4c8ec75405c91c368b3e04971 100644 (file)
     {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"}
-      <div class="status">{$status}</div>
+      {if $status}
+        <div class="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}
+            <br />
+            {ts 1=$notifyingStatuses}Participants whose status is changed TO any of the following will be automatically notified via email: %1{/ts}
+          {/if}
+        </div>
+      {/if}
     {else}
       {if $statusProfile EQ 1} {* Update Participant Status in batch task *}
         <div class="status">{$status}</div>