XOOPS  2.6.0
text.php
Go to the documentation of this file.
1 <?php
21 {
25  public function __construct($object = null)
26  {
27  $this->object = $object;
28  $this->config = $object->config;
29 
31 
32  parent::__construct('', 'xcaptchaform', $xoops->getEnv('PHP_SELF'), 'post', true, 'horizontal');
33 
34  $this->addElement(new Xoops\Form\Text(_XCAPTCHA_NUM_CHARS, 'num_chars', 2, 2, $this->config['num_chars']), true);
35 
36  $this->addElement(new Xoops\Form\Hidden('type', 'text'));
37 
39  $button_tray->addElement(new Xoops\Form\Hidden('op', 'save'));
40  $button_tray->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
41  $button_tray->addElement(new Xoops\Form\Button('', 'reset', XoopsLocale::A_RESET, 'reset'));
42  $cancel_send = new Xoops\Form\Button('', 'cancel', XoopsLocale::A_CANCEL, 'button');
43  $cancel_send->setExtra("onclick='javascript:history.go(-1);'");
44  $button_tray->addElement($cancel_send);
45 
46  $this->addElement($button_tray);
47  }
48 }
const A_SUBMIT
Definition: en_US.php:128
const A_RESET
Definition: en_US.php:121
static getInstance()
Definition: Xoops.php:160
addElement(Element $formElement, $required=false)
Definition: Form.php:206
$xoops
Definition: admin.php:25
__construct($object=null)
Definition: text.php:25
const A_CANCEL
Definition: en_US.php:82
$button_tray
Definition: xoops_code.php:26