diff options
| author | Simon | 2011-03-04 18:33:19 +0100 |
|---|---|---|
| committer | Simon | 2011-03-04 18:33:19 +0100 |
| commit | 2c3d9f3d53afedf153a28f1f0ac2c8c4957dcf51 (patch) | |
| tree | 99e2391da8bedfcbda3122653c26144a8a439d92 /application/forms | |
| parent | Filtertypen in SQL hinzugefügt && notes (von notiz-zettel)n hinzugefügt (diff) | |
| download | pbs2-2c3d9f3d53afedf153a28f1f0ac2c8c4957dcf51.tar.gz pbs2-2c3d9f3d53afedf153a28f1f0ac2c8c4957dcf51.tar.xz pbs2-2c3d9f3d53afedf153a28f1f0ac2c8c4957dcf51.zip | |
Filters Übersicht, FilterEntries hinzufügen
Diffstat (limited to 'application/forms')
| -rw-r--r-- | application/forms/FilterEdit.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/application/forms/FilterEdit.php b/application/forms/FilterEdit.php new file mode 100644 index 0000000..5d5a242 --- /dev/null +++ b/application/forms/FilterEdit.php @@ -0,0 +1,54 @@ +<?php + +class Application_Form_FilterEdit extends Zend_Form +{ + private $filterID = null; + + public function init() + { + $this->setName("Add Filter"); + $this->setMethod('post'); + + + try{ + $filtertypemapper = new Application_Model_FilterTypeMapper(); + $filtertype = $filtertypemapper->fetchAll(); + }catch (Zend_Exception $e) { + echo "Error message 1: " . $e->getMessage() . "\n"; + } + + $filtertypes = $this->createElement('select','filtertype'); + $filtertypes ->setLabel('Type:'); + foreach($filtertype as $f){ + $filtertypes->addMultiOption($f->getID(),$f->getFiltertypename()); + } + $this->addElement($filtertypes); + + + $this->addElement('text', 'filtervalue1', array( + 'label' => 'Value1:' + )); + + $this->addElement('text', 'filtervalue2', array( + 'label' => 'Value2:' + )); + + $this->addElement('hidden', 'filterID', array( + 'value' => $this->filterID + )); + + $this->addElement('submit', 'add', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Add Filtertype', + )); + } + public function setFilterID($id) + { + $this->filterID = $id; + } + + + +} + |
