1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
19:
20: class XcaptchaTextForm extends Xoops\Form\ThemeForm
21: {
22: 23: 24:
25: public function __construct($object = null)
26: {
27: $this->object = $object;
28: $this->config = $object->config;
29:
30: $xoops = Xoops::getInstance();
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:
38: $buttonTray = new Xoops\Form\ElementTray('', '');
39: $buttonTray->addElement(new Xoops\Form\Hidden('op', 'save'));
40: $buttonTray->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
41: $buttonTray->addElement(new Xoops\Form\Button('', 'reset', XoopsLocale::A_RESET, 'reset'));
42: $buttonCancelSend = new Xoops\Form\Button('', 'cancel', XoopsLocale::A_CANCEL, 'button');
43: $buttonCancelSend->setExtra("onclick='javascript:history.go(-1);'");
44: $buttonTray->addElement($buttonCancelSend);
45:
46: $this->addElement($buttonTray);
47: }
48: }
49: