Merge pull request #18440 from civicrm/5.30
[civicrm-core.git] / CRM / Event / Form / Task / ParticipantStatus.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 class CRM_Event_Form_Task_ParticipantStatus extends CRM_Event_Form_Task_Batch {
18
19 public function buildQuickForm() {
20 // CRM_Event_Form_Task_Batch::buildQuickForm() gets ufGroupId
21 // from the form, so set it here to the id of the reserved profile
22 $dao = new CRM_Core_DAO_UFGroup();
23 $dao->name = 'participant_status';
24 $dao->find(TRUE);
25 $this->set('ufGroupId', $dao->id);
26
27 $statuses = CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label');
28 asort($statuses, SORT_STRING);
29 $this->add('select', 'status_change', ts('Change All Statuses'),
30 [
31 '' => ts('- select status -'),
32 ] + $statuses
33 );
34
35 $this->assign('context', 'statusChange');
36 // CRM-4321: display info on users being notified if any of the below statuses is enabled
37 parent::assignToTemplate();
38 parent::buildQuickForm();
39 }
40
41 }