summaryrefslogtreecommitdiffstats
path: root/application/forms/EventAdd.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-07 17:14:16 +0200
committerBjörn Geiger2011-09-07 17:14:16 +0200
commit0b0d6221d23b9f5b125062adf1d249ab5d1a6d61 (patch)
treeaf16a179302360e6d8a5b174c9218a48d65c835d /application/forms/EventAdd.php
parentkleine Korrektur (diff)
downloadpoolctrl-0b0d6221d23b9f5b125062adf1d249ab5d1a6d61.tar.gz
poolctrl-0b0d6221d23b9f5b125062adf1d249ab5d1a6d61.tar.xz
poolctrl-0b0d6221d23b9f5b125062adf1d249ab5d1a6d61.zip
default eventcategory geändert
Diffstat (limited to 'application/forms/EventAdd.php')
-rw-r--r--application/forms/EventAdd.php45
1 files changed, 36 insertions, 9 deletions
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index be2c77c..b62eed5 100644
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -8,6 +8,7 @@ class Application_Form_EventAdd extends Zend_Form
private $eventcategorylist;
private $start;
private $end;
+ private $defaultEventCategory;
public function setMembershiplist($membershiplist){
$this->membershiplist = $membershiplist;
@@ -32,30 +33,50 @@ class Application_Form_EventAdd extends Zend_Form
}
+ public function getPoollist(){
+ return $this->poollist;
+ }
+
+ public function getEventcategorylist()
+ {
+ return $this->eventcategorylist;
+ }
+
+ public function setEventcategorylist($eventcategorylist)
+ {
+ $this->eventcategorylist = $eventcategorylist;
+ }
+
+ public function getStart()
+ {
+ return $this->start;
+ }
+
public function setStart($start)
{
$this->start = $start;
return $this;
}
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
public function setEnd($end)
{
$this->end = $end;
return $this;
}
- public function getPoollist(){
- return $this->poollist;
- }
-
- public function getEventcategorylist()
+ public function getDefaultEventCategory()
{
- return $this->eventcategorylist;
+ return $this->defaultEventCategory;
}
- public function setEventcategorylist($eventcategorylist)
+ public function setDefaultEventCategory($defaultEventCategory)
{
- $this->eventcategorylist = $eventcategorylist;
+ $this->defaultEventCategory = $defaultEventCategory;
}
public function init()
@@ -68,12 +89,18 @@ class Application_Form_EventAdd extends Zend_Form
if(count($this->eventcategorylist)>0){
foreach($this->eventcategorylist as $category => $c){
- $eventcategoryfield->addMultiOption($c->getID(), $c->getTitle());
+ $title = $c->getTitle();
+ $id = $c->getID();
+ $eventcategoryfield->addMultiOption($id, $title);
+ if($title == $this->defaultEventCategory) {
+ $defaultEventCategoryID = $id;
+ }
}
}
$eventcategoryfield->setRegisterInArrayValidator(false);
$eventcategoryfield->setAttrib('onchange', "eventcategoryfieldChanged('category');");
+ $eventcategoryfield->setValue($defaultEventCategoryID);
$this->addElement($eventcategoryfield);
$this->addElement('text', 'title', array(