summaryrefslogtreecommitdiffstats
path: root/application/forms
diff options
context:
space:
mode:
authormichael pereira2011-03-05 13:27:20 +0100
committermichael pereira2011-03-05 13:27:20 +0100
commit3e86f2118ae8fd85e433913410c82915232cd073 (patch)
tree3fbb90e62a1974cc9daf94d58a79f06ae449e0fd /application/forms
parentbootos v1 (diff)
parentOberfläche der filter wurde verbessert, sodass nun filterentrys angelegt wer... (diff)
downloadpbs2-3e86f2118ae8fd85e433913410c82915232cd073.tar.gz
pbs2-3e86f2118ae8fd85e433913410c82915232cd073.tar.xz
pbs2-3e86f2118ae8fd85e433913410c82915232cd073.zip
.zfproject fix
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 Conflicts: .zfproject.xml
Diffstat (limited to 'application/forms')
-rw-r--r--application/forms/FilterEdit.php54
-rw-r--r--application/forms/FilterEntriesAdd.php53
2 files changed, 107 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;
+ }
+
+
+
+}
+
diff --git a/application/forms/FilterEntriesAdd.php b/application/forms/FilterEntriesAdd.php
new file mode 100644
index 0000000..8ec5bd9
--- /dev/null
+++ b/application/forms/FilterEntriesAdd.php
@@ -0,0 +1,53 @@
+<?php
+
+class Application_Form_FilterEntriesAdd extends Zend_Form
+{
+
+ private $filterID = null;
+
+ public function init()
+ {
+ $this->setName("Add Filterentry");
+ $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;
+ }
+
+}
+