diff options
Diffstat (limited to 'application/forms/BootisoCreate.php')
| -rw-r--r-- | application/forms/BootisoCreate.php | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/application/forms/BootisoCreate.php b/application/forms/BootisoCreate.php new file mode 100644 index 0000000..035205d --- /dev/null +++ b/application/forms/BootisoCreate.php @@ -0,0 +1,83 @@ +<?php + +class Application_Form_BootisoCreate extends Zend_Form +{ + + public function init() + { + $this->setName("BootIsoCreate"); + $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('text', 'path', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Path:', + )); + + $this->addElement('text', 'serialnumber', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Serialnumber:', + )); + + $date = new DateTime(); + $date->add(new DateInterval('P1Y')); + $this->addElement('text', 'expires', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'Expires:', + 'value' => $date->format('Y-m-d'), + )); + + $this->addElement('text', 'public', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Public-Level:', + )); + + $this->addElement('submit', 'createbootiso', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Create BootISO', + )); + + $this->addElement('button', 'Cancel', array( + 'onclick' => 'self.location="/bootiso"' + )); + + } + + +} + |
