public function buildQuickForm() { // CRM_Event_Form_Task_Batch::buildQuickForm() gets ufGroupId // from the form, so set it here to the id of the reserved profile $dao = new CRM_Core_DAO_UFGroup(); $dao->name = 'participant_status'; $dao->find(TRUE); $this->set('ufGroupId', $dao->id); $statuses = CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label'); asort($statuses, SORT_STRING); $this->add('select', 'status_change', ts('Change All Statuses'), array('' => ts('- select status -')) + $statuses); $this->assign('context', 'statusChange'); # CRM-4321: display info on users being notified if any of the below statuses is enabled parent::assignToTemplate(); parent::buildQuickForm(); }
function buildQuickForm() { // CRM_Event_Form_Task_Batch::buildQuickForm() gets ufGroupId // from the form, so set it here to the id of the reserved profile require_once 'CRM/Core/DAO/UFGroup.php'; $dao = new CRM_Core_DAO_UFGroup(); $dao->name = 'participant_status'; $dao->find(true); $this->set('ufGroupId', $dao->id); require_once 'CRM/Event/PseudoConstant.php'; $statuses =& CRM_Event_PseudoConstant::participantStatus(); asort($statuses, SORT_STRING); $this->add('select', 'status_change', ts('Change All Statuses'), array('' => ts('- select status -')) + $statuses, null, array('onchange' => "if (this.value) setStatusesTo(this.value);")); $this->assign('context', 'statusChange'); # CRM-4321: display info on users being notified if any of the below statuses is enabled require_once 'CRM/Event/PseudoConstant.php'; $notifyingStatuses = array(ts('Pending from waitlist'), ts('Pending from approval'), ts('Expired'), ts('Cancelled')); $notifyingStatuses = array_intersect($notifyingStatuses, CRM_Event_PseudoConstant::participantStatus()); $this->assign('notifyingStatuses', implode(', ', $notifyingStatuses)); parent::buildQuickForm(); }