1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: /**
13: * page module
14: *
15: * @copyright XOOPS Project (http://xoops.org)
16: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17: * @package Menus
18: * @since 2.6.0
19: * @author Mage Gregory (AKA Mage)
20: * @version $Id$
21: */
22:
23: class MenusMenus_menusForm extends Xoops\Form\ThemeForm
24: {
25: /**
26: * @param MenusMenus $obj
27: */
28: public function __construct(MenusMenus $obj)
29: {
30: $xoops = Xoops::getInstance();
31:
32: $title = $obj->isNew() ? sprintf(_AM_MENUS_ADD_MENUS) : sprintf(_AM_MENUS_EDIT_MENUS);
33:
34: parent::__construct($title, 'form', 'admin_menus.php', 'post', true);
35:
36: //title
37: $this->addElement(new Xoops\Form\Text(_AM_MENUS_MENU_TITLE, 'title', 50, 255, $obj->getVar('title'), ''), true);
38:
39: $this->addElement(new Xoops\Form\Hidden('id', $obj->getVar('id')));
40: $this->addElement(new Xoops\Form\Hidden('op', 'save'));
41: $this->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
42: }
43: }
44: