diff options
| author | michael pereira | 2011-03-29 10:59:15 +0200 |
|---|---|---|
| committer | michael pereira | 2011-03-29 10:59:15 +0200 |
| commit | 03b4da383449c290ea01723095d1a87fa257fea5 (patch) | |
| tree | 4943185a212ced33465b92811cd070bf8e45b717 /application/modules/user/forms | |
| parent | updatebutton geadded (diff) | |
| download | pbs2-03b4da383449c290ea01723095d1a87fa257fea5.tar.gz pbs2-03b4da383449c290ea01723095d1a87fa257fea5.tar.xz pbs2-03b4da383449c290ea01723095d1a87fa257fea5.zip | |
Preboot User Controller fertig, ACL fehlt noch
Diffstat (limited to 'application/modules/user/forms')
| -rw-r--r-- | application/modules/user/forms/Preboot.php | 56 |
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"' + )); + + } + + +} + |
