diff options
Diffstat (limited to 'application/forms')
| -rw-r--r-- | application/forms/BootmenuCreate.php | 33 | ||||
| -rw-r--r-- | application/forms/BootmenuEdit.php | 36 |
2 files changed, 65 insertions, 4 deletions
diff --git a/application/forms/BootmenuCreate.php b/application/forms/BootmenuCreate.php index 35d476f..5b284f5 100644 --- a/application/forms/BootmenuCreate.php +++ b/application/forms/BootmenuCreate.php @@ -5,7 +5,38 @@ class Application_Form_BootmenuCreate extends Zend_Form public function init() { - /* Form Elements & Other Definitions Here ... */ + $this->setName("BootMenuCreate"); + $this->setMethod('post'); + + $this->addElement('text', 'title', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); + + $this->addElement('text', 'groupID', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'GroupID:', + 'value' => '1', + )); + + $this->addElement('submit', 'createbootmenu', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Create Bootmenu', + )); + + $this->addElement('button', 'Cancel', array( + 'onclick' => 'self.location="/bootmenu"' + )); + } diff --git a/application/forms/BootmenuEdit.php b/application/forms/BootmenuEdit.php index 3bc0a1d..a3733bf 100644 --- a/application/forms/BootmenuEdit.php +++ b/application/forms/BootmenuEdit.php @@ -3,11 +3,41 @@ class Application_Form_BootmenuEdit extends Zend_Form { - public function init() + public function init() { - /* Form Elements & Other Definitions Here ... */ - } + $this->setName("BootMenuEdit"); + $this->setMethod('post'); + + $this->addElement('text', 'title', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); + + $this->addElement('text', 'groupID', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'GroupID:', + 'value' => '1', + )); + + $this->addElement('submit', 'editbootmenu', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Edit BootMenu', + )); + + $this->addElement('button', 'Cancel', array( + 'onclick' => 'self.location="/bootmenu"' + )); + } } |
