summaryrefslogtreecommitdiffstats
path: root/application/forms
diff options
context:
space:
mode:
authorSimon2011-03-05 17:41:24 +0100
committerSimon2011-03-05 17:41:24 +0100
commit3a57892f9145bfadac4cf3bf4392020f99e0d541 (patch)
tree9e22a2749ae1713f4cc10395555d5757f6e52a36 /application/forms
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-3a57892f9145bfadac4cf3bf4392020f99e0d541.tar.gz
pbs2-3a57892f9145bfadac4cf3bf4392020f99e0d541.tar.xz
pbs2-3a57892f9145bfadac4cf3bf4392020f99e0d541.zip
filter-oberffäche fertig, nun zur auswahl des bootmenus && funktion toArray bei jedem Mapper hinzugefügt, um populate bei Formularen nutzen zu können
Diffstat (limited to 'application/forms')
-rw-r--r--application/forms/FilterAdd.php4
-rw-r--r--application/forms/FilterEdit.php35
-rw-r--r--application/forms/FilterEntriesAdd.php6
3 files changed, 5 insertions, 40 deletions
diff --git a/application/forms/FilterAdd.php b/application/forms/FilterAdd.php
index 825d3f2..c3395c6 100644
--- a/application/forms/FilterAdd.php
+++ b/application/forms/FilterAdd.php
@@ -29,10 +29,10 @@ class Application_Form_FilterAdd extends Zend_Form
'required' => true,
'label' => 'Priority:',
));
- $this->addElement('submit', 'add', array(
+ $submit = $this->addElement('submit', 'add', array(
'required' => false,
'ignore' => true,
- 'label' => 'Add Filter',
+ 'label' => 'Save',
));
}
diff --git a/application/forms/FilterEdit.php b/application/forms/FilterEdit.php
index 5d5a242..ee4f637 100644
--- a/application/forms/FilterEdit.php
+++ b/application/forms/FilterEdit.php
@@ -6,42 +6,7 @@ class Application_Form_FilterEdit extends Zend_Form
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)
{
diff --git a/application/forms/FilterEntriesAdd.php b/application/forms/FilterEntriesAdd.php
index 8ec5bd9..2fd19ae 100644
--- a/application/forms/FilterEntriesAdd.php
+++ b/application/forms/FilterEntriesAdd.php
@@ -18,7 +18,7 @@ class Application_Form_FilterEntriesAdd extends Zend_Form
echo "Error message 1: " . $e->getMessage() . "\n";
}
- $filtertypes = $this->createElement('select','filtertype');
+ $filtertypes = $this->createElement('select','filtertypeID');
$filtertypes ->setLabel('Type:');
foreach($filtertype as $f){
$filtertypes->addMultiOption($f->getID(),$f->getFiltertypename());
@@ -26,7 +26,7 @@ class Application_Form_FilterEntriesAdd extends Zend_Form
$this->addElement($filtertypes);
- $this->addElement('text', 'filtervalue1', array(
+ $this->addElement('text', 'filtervalue', array(
'label' => 'Value1:'
));
@@ -41,7 +41,7 @@ class Application_Form_FilterEntriesAdd extends Zend_Form
$this->addElement('submit', 'add', array(
'required' => false,
'ignore' => true,
- 'label' => 'Add Filtertype',
+ 'label' => 'Save',
));
}
public function setFilterID($id)