Cheetah
ChEventsFormSearch.php
Go to the documentation of this file.
1 <?php
2 
8 require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbProfileFields.php');
9 
11 {
12  function __construct ()
13  {
14  $oProfileFields = new ChWsbProfileFields(0);
15  $aCountries = $oProfileFields->convertValues4Input('#!Country');
16  $aCountries = array_merge (array('' => _t('_ch_events_all_countries')), $aCountries);
17 
18  $aCustomForm = array(
19 
20  'form_attrs' => array(
21  'name' => 'form_search_events',
22  'action' => '',
23  'method' => 'get',
24  ),
25 
26  'params' => array (
27  'db' => array(
28  'submit_name' => 'submit_form',
29  ),
30  'csrf' => array(
31  'disable' => true,
32  ),
33  ),
34 
35  'inputs' => array(
36  'Keyword' => array(
37  'type' => 'text',
38  'name' => 'Keyword',
39  'caption' => _t('_ch_events_caption_keyword'),
40  'required' => true,
41  'checker' => array (
42  'func' => 'length',
43  'params' => array(3,100),
44  'error' => _t ('_ch_events_err_keyword'),
45  ),
46  'db' => array (
47  'pass' => 'Xss',
48  ),
49  ),
50  'Country' => array(
51  'type' => 'select_box',
52  'name' => 'Country',
53  'caption' => _t('_ch_events_caption_country'),
54  'values' => $aCountries,
55  'required' => true,
56  'checker' => array (
57  'func' => 'preg',
58  'params' => array('/^[a-zA-Z]{0,2}$/'),
59  'error' => _t ('_ch_events_err_country'),
60  ),
61  'db' => array (
62  'pass' => 'Preg',
63  'params' => array('/([a-zA-Z]{0,2})/'),
64  ),
65  ),
66  'Submit' => array (
67  'type' => 'submit',
68  'name' => 'submit_form',
69  'value' => _t('_Submit'),
70  'colspan' => true,
71  ),
72  ),
73  );
74 
75  parent::__construct ($aCustomForm);
76  }
77 }
ChEventsFormSearch
Definition: ChEventsFormSearch.php:11
ChTemplFormView
Definition: ChTemplFormView.php:11
ChWsbProfileFields
Definition: ChWsbProfileFields.php:13
php
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChEventsFormSearch\__construct
__construct()
Definition: ChEventsFormSearch.php:12