$this->_fields = array();
$this->_fields = CRM_Core_BAO_UFGroup::getFields($ufGroupId, FALSE, CRM_Core_Action::VIEW);
if (array_key_exists('participant_status', $this->_fields)) {
- CRM_Event_Form_Task_ParticipantStatus::assignToTemplate('statusChangeBatch');
- }
+ $this->assign('statusProfile', 1);
+ $this->assignToTemplate();
+ }
// remove file type field and then limit fields
$suppressFields = FALSE;
return $statusId;
}
+ /**
+ * Assign the minimal set of variables to the template.
+ */
+ 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 notyou want to do, you can change their participant status by editing their event registration record directly.');
+ 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('status', $status);
+ }
+
}
) + $statuses
);
+ $this->assign('context', 'statusChange');
# CRM-4321: display info on users being notified if any of the below statuses is enabled
- self::assignToTemplate('statusChange');
-
+ parent::assignToTemplate();
parent::buildQuickForm();
}
- public function assignToTemplate($context) {
- $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.');
- 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('status', $status);
- $this->assign('context', $context);
- }
}
{$form.status_change.html} {help id="id-status_change"}
<div class="status">{$status}</div>
{else}
- {if $context EQ 'statusChangeBatch'} {* Update Participant Status in batch task *}
+ {if $statusProfile EQ 1} {* Update Participant Status in batch task *}
<div class="status">{$status}</div>
{/if}
{ts}Update field values for each participant as needed. To set a field to the same value for ALL rows, enter that value for the first participation and then click the