summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms/Preboot.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/forms/Preboot.php')
-rw-r--r--application/modules/user/forms/Preboot.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/application/modules/user/forms/Preboot.php b/application/modules/user/forms/Preboot.php
new file mode 100644
index 0000000..d46ae9c
--- /dev/null
+++ b/application/modules/user/forms/Preboot.php
@@ -0,0 +1,56 @@
+<?php
+
+class user_Form_Preboot extends Zend_Form
+{
+
+ private $action;
+
+ public function setAction($action){
+ $this->action = $action;
+
+ }
+
+ public function init()
+ {
+ $this->setName($this->action);
+ $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', 'path_preboot', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 240)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Path to Preboot:',
+ ));
+
+ if($this->action == "createpreboot")
+ $label = "Create Preboot";
+ else
+ $label = "Edit Preboot";
+
+ $this->addElement('submit', $this->action, array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $label,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/user/preboot"'
+ ));
+
+ }
+
+
+}
+