Cheetah
ChWsbTwigFormBroadcast.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbProfileFields');
9 
14 {
15 
16  function __construct ($sCaptionMsgTitle, $sErrMsgTitle, $sCaptionMsgBody, $sErrMsgBory)
17  {
18  $aCustomForm = array(
19 
20  'form_attrs' => array(
21  'name' => 'form_broadcast',
22  'action' => '',
23  'method' => 'post',
24  ),
25 
26  'params' => array (
27  'db' => array(
28  'submit_name' => 'submit_form',
29  ),
30  ),
31 
32  'inputs' => array(
33  'title' => array(
34  'type' => 'text',
35  'name' => 'title',
36  'caption' => $sCaptionMsgTitle,
37  'required' => true,
38  'checker' => array (
39  'func' => 'length',
40  'params' => array(3,100),
41  'error' => $sErrMsgTitle,
42  ),
43  'db' => array (
44  'pass' => 'Xss',
45  ),
46  ),
47 
48  'message' => array(
49  'type' => 'textarea',
50  'name' => 'message',
51  'caption' => $sCaptionMsgBody,
52  'required' => true,
53  'checker' => array (
54  'func' => 'length',
55  'params' => array(10,64000),
56  'error' => $sErrMsgBory,
57  ),
58  'db' => array (
59  'pass' => 'Xss',
60  ),
61  ),
62 
63  'Submit' => array (
64  'type' => 'submit',
65  'name' => 'submit_form',
66  'value' => _t('_Submit'),
67  ),
68  ),
69  );
70 
71  parent::__construct ($aCustomForm);
72  }
73 }
ChTemplFormView
Definition: ChTemplFormView.php:11
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ChWsbTwigFormBroadcast\__construct
__construct($sCaptionMsgTitle, $sErrMsgTitle, $sCaptionMsgBody, $sErrMsgBory)
Definition: ChWsbTwigFormBroadcast.php:16
ChWsbTwigFormBroadcast
Definition: ChWsbTwigFormBroadcast.php:14