summaryrefslogtreecommitdiffstats
path: root/application/forms
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms')
-rw-r--r--application/forms/BootosCreate.php5
-rw-r--r--application/forms/BootosEdit.php103
2 files changed, 107 insertions, 1 deletions
diff --git a/application/forms/BootosCreate.php b/application/forms/BootosCreate.php
index ca279a0..a9648e4 100644
--- a/application/forms/BootosCreate.php
+++ b/application/forms/BootosCreate.php
@@ -100,6 +100,11 @@ class Application_Form_BootosCreate extends Zend_Form
'ignore' => true,
'label' => 'Create BootOS',
));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootos"'
+ ));
+
}
diff --git a/application/forms/BootosEdit.php b/application/forms/BootosEdit.php
index 70f11da..3bc522f 100644
--- a/application/forms/BootosEdit.php
+++ b/application/forms/BootosEdit.php
@@ -5,9 +5,110 @@ class Application_Form_BootosEdit extends Zend_Form
public function init()
{
- /* Form Elements & Other Definitions Here ... */
+ $this->setName("BootOsEdit");
+ $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', 'editbootos', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit BootOS',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootos"'
+ ));
+
}
}
+
+