Cheetah
ChStoreFormSearch.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbProfileFields');
9 
11 {
12  function __construct ()
13  {
14  ch_import('ChWsbCategories');
15  $oCategories = new ChWsbCategories();
16  $oCategories->getTagObjectConfig ();
17  $aCategories = $oCategories->getCategoriesList('ch_store', (int)$iProfileId, true);
18 
19  $aCustomForm = array(
20 
21  'form_attrs' => array(
22  'name' => 'form_search_store',
23  'action' => '',
24  'method' => 'get',
25  ),
26 
27  'params' => array (
28  'db' => array(
29  'submit_name' => 'submit_form',
30  ),
31  'csrf' => array(
32  'disable' => true,
33  ),
34  ),
35 
36  'inputs' => array(
37  'Keyword' => array(
38  'type' => 'text',
39  'name' => 'Keyword',
40  'caption' => _t('_ch_store_form_caption_keyword'),
41  'required' => true,
42  'checker' => array (
43  'func' => 'length',
44  'params' => array(3,100),
45  'error' => _t ('_ch_store_form_err_keyword'),
46  ),
47  'db' => array (
48  'pass' => 'Xss',
49  ),
50  ),
51  'Category' => array(
52  'type' => 'select_box',
53  'name' => 'Category',
54  'caption' => _t('_ch_store_form_caption_category'),
55  'values' => $aCategories,
56  'required' => true,
57  'checker' => array (
58  'func' => 'avail',
59  'error' => _t ('_ch_store_form_err_category'),
60  ),
61  'db' => array (
62  'pass' => 'Xss',
63  ),
64  ),
65  'Submit' => array (
66  'type' => 'submit',
67  'name' => 'submit_form',
68  'value' => _t('_Submit'),
69  'colspan' => true,
70  ),
71  ),
72  );
73 
74  parent::__construct ($aCustomForm);
75  }
76 }
ChTemplFormView
Definition: ChTemplFormView.php:11
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
ChWsbCategories
Definition: ChWsbCategories.php:13
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChStoreFormSearch
Definition: ChStoreFormSearch.php:11
ChStoreFormSearch\__construct
__construct()
Definition: ChStoreFormSearch.php:12
$iProfileId
if( $sMembersList) $iProfileId
Definition: communicator.php:29