diff options
| author | michael pereira | 2011-03-05 13:12:23 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-05 13:12:23 +0100 |
| commit | 92e5b7a7b6bb780ef5e788b7711f8a999ac80f41 (patch) | |
| tree | 9886c2229205ea8478e9a0bf0ca9fc5fb8de68e8 /application/forms/BootosCreate.php | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.tar.gz pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.tar.xz pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.zip | |
bootos v1
Diffstat (limited to 'application/forms/BootosCreate.php')
| -rw-r--r-- | application/forms/BootosCreate.php | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/application/forms/BootosCreate.php b/application/forms/BootosCreate.php new file mode 100644 index 0000000..ca279a0 --- /dev/null +++ b/application/forms/BootosCreate.php @@ -0,0 +1,107 @@ +<?php + +class Application_Form_BootosCreate extends Zend_Form +{ + + public function init() + { + $this->setName("BootOsCreate"); + $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', 'configID', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'ConfigID:', + )); + + $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_init', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Init-Path:', + )); + + $this->addElement('text', 'path_kernel', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Kernel-Path:', + )); + + $this->addElement('text', 'defaultkcl', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Default-KCL:', + )); + + $this->addElement('textarea', 'description', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'Description:', + )); + + $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', 'createbootos', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Create BootOS', + )); + } + + +} + |
