1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: 13: 14: 15: 16: 17:
18:
19: class ProfileRegstepForm extends Xoops\Form\ThemeForm
20: {
21: 22: 23:
24: public function __construct(ProfileRegstep $obj)
25: {
26: parent::__construct(_PROFILE_AM_STEP, 'stepform', 'step.php', 'post', true);
27: if (!$obj->isNew()) {
28: $this->addElement(new Xoops\Form\Hidden('id', $obj->getVar('step_id')));
29: }
30: $this->addElement(new Xoops\Form\Hidden('op', 'save'));
31: $this->addElement(new Xoops\Form\Text(_PROFILE_AM_STEPNAME, 'step_name', 5, 255, $obj->getVar('step_name', 'e')), true);
32: $this->addElement(new Xoops\Form\Text(_PROFILE_AM_STEPINTRO, 'step_desc', 5, 255, $obj->getVar('step_desc', 'e')));
33: $order = new Xoops\Form\Text(_PROFILE_AM_STEPORDER, 'step_order', 1, 10, $obj->getVar('step_order', 'e'), '');
34: $order->setPattern('^\d+$', _PROFILE_AM_ERROR_WEIGHT);
35: $this->addElement($order, true);
36:
37: $this->addElement(new Xoops\Form\RadioYesNo(_PROFILE_AM_STEPSAVE, 'step_save', $obj->getVar('step_save', 'e')));
38: $this->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
39: }
40: }
41: