summaryrefslogtreecommitdiffstats
path: root/application/forms
diff options
context:
space:
mode:
authormichael pereira2011-03-06 16:16:43 +0100
committermichael pereira2011-03-06 16:16:43 +0100
commit38a1adce564a405684d3397b77a58bfc50d1d3e7 (patch)
tree6e4fc0ba8b22c2911554155329d030bca9331428 /application/forms
parentaufgeraeumt (diff)
downloadpbs2-38a1adce564a405684d3397b77a58bfc50d1d3e7.tar.gz
pbs2-38a1adce564a405684d3397b77a58bfc50d1d3e7.tar.xz
pbs2-38a1adce564a405684d3397b77a58bfc50d1d3e7.zip
Config fertig
Diffstat (limited to 'application/forms')
-rw-r--r--application/forms/BootosEdit.php8
-rw-r--r--application/forms/ConfigCreate.php45
-rw-r--r--application/forms/ConfigEdit.php45
3 files changed, 92 insertions, 6 deletions
diff --git a/application/forms/BootosEdit.php b/application/forms/BootosEdit.php
index 3bc522f..89edf79 100644
--- a/application/forms/BootosEdit.php
+++ b/application/forms/BootosEdit.php
@@ -17,6 +17,14 @@ class Application_Form_BootosEdit extends Zend_Form
'label' => 'Title:',
));
+ $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'),
diff --git a/application/forms/ConfigCreate.php b/application/forms/ConfigCreate.php
index 2c9516d..705fd62 100644
--- a/application/forms/ConfigCreate.php
+++ b/application/forms/ConfigCreate.php
@@ -1,13 +1,52 @@
<?php
-class Application_Form_ConfigAdd extends Zend_Form
+class Application_Form_ConfigCreate extends Zend_Form
{
public function init()
{
- /* Form Elements & Other Definitions Here ... */
- }
+ $this->setName("ConfigCreate");
+ $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('textarea', 'shellscript', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Shellscript:',
+ ));
+
+ $this->addElement('submit', 'createconfig', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create Config',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/config"'
+ ));
+ }
}
diff --git a/application/forms/ConfigEdit.php b/application/forms/ConfigEdit.php
index 6403f06..3883595 100644
--- a/application/forms/ConfigEdit.php
+++ b/application/forms/ConfigEdit.php
@@ -3,11 +3,50 @@
class Application_Form_ConfigEdit extends Zend_Form
{
- public function init()
+ public function init()
{
- /* Form Elements & Other Definitions Here ... */
- }
+ $this->setName("ConfigEdit");
+ $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('textarea', 'shellscript', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Shellscript:',
+ ));
+
+ $this->addElement('submit', 'editconfig', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit Config',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/config"'
+ ));
+ }
}