diff options
Diffstat (limited to 'application/forms')
| -rw-r--r-- | application/forms/FilterAdd.php | 4 | ||||
| -rw-r--r-- | application/forms/FilterEdit.php | 35 | ||||
| -rw-r--r-- | application/forms/FilterEntriesAdd.php | 6 |
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) |
