Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
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 | | |
6a488035 TO |
9 | +--------------------------------------------------------------------+ |
10 | */ | |
11 | ||
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | class CRM_Batch_Form_Search extends CRM_Core_Form { | |
62d3ee27 | 18 | |
e0ef6999 | 19 | /** |
3819f101 | 20 | * Set default values. |
21 | * | |
e0ef6999 EM |
22 | * @return array |
23 | */ | |
00be9182 | 24 | public function setDefaultValues() { |
be2fb01f | 25 | $defaults = []; |
6a488035 TO |
26 | |
27 | $status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1); | |
28 | ||
29 | $defaults['batch_status'] = $status; | |
30 | return $defaults; | |
31 | } | |
32 | ||
33 | public function buildQuickForm() { | |
34 | $this->add('text', 'title', ts('Find'), | |
35 | CRM_Core_DAO::getAttribute('CRM_Batch_DAO_Batch', 'title') | |
36 | ); | |
37 | ||
38 | $this->addButtons( | |
be2fb01f CW |
39 | [ |
40 | [ | |
6a488035 TO |
41 | 'type' => 'refresh', |
42 | 'name' => ts('Search'), | |
43 | 'isDefault' => TRUE, | |
be2fb01f CW |
44 | ], |
45 | ] | |
6a488035 TO |
46 | ); |
47 | ||
48 | parent::buildQuickForm(); | |
49 | $this->assign('suppressForm', TRUE); | |
50 | } | |
96025800 | 51 | |
6a488035 | 52 | } |