summaryrefslogtreecommitdiffstats
path: root/application/forms/EventAdd.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-13 18:14:40 +0200
committerBjörn Geiger2011-09-13 18:14:40 +0200
commit9058ef1bfef2b9adebb82d14dada177e19872175 (patch)
tree0c6672adc1c090b231d3cbb6f0531b01c89e9640 /application/forms/EventAdd.php
parentpoolSessionSelect (diff)
downloadpoolctrl-9058ef1bfef2b9adebb82d14dada177e19872175.tar.gz
poolctrl-9058ef1bfef2b9adebb82d14dada177e19872175.tar.xz
poolctrl-9058ef1bfef2b9adebb82d14dada177e19872175.zip
verschiedenes
Diffstat (limited to 'application/forms/EventAdd.php')
-rwxr-xr-xapplication/forms/EventAdd.php59
1 files changed, 39 insertions, 20 deletions
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 1f948fb..fce7566 100755
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -9,9 +9,11 @@ class Application_Form_EventAdd extends Zend_Form
private $start;
private $end;
private $defaultEventCategoryID;
+ private $poolID;
public function setMembershiplist($membershiplist){
$this->membershiplist = $membershiplist;
+ return $this;
}
@@ -21,6 +23,7 @@ class Application_Form_EventAdd extends Zend_Form
public function setBootoslist($bootoslist){
$this->bootoslist = $bootoslist;
+ return $this;
}
@@ -30,6 +33,7 @@ class Application_Form_EventAdd extends Zend_Form
public function setPoollist($poollist){
$this->poollist = $poollist;
+ return $this;
}
@@ -45,6 +49,7 @@ class Application_Form_EventAdd extends Zend_Form
public function setEventcategorylist($eventcategorylist)
{
$this->eventcategorylist = $eventcategorylist;
+ return $this;
}
public function getStart()
@@ -77,6 +82,18 @@ class Application_Form_EventAdd extends Zend_Form
public function setDefaultEventCategoryID($defaultEventCategoryID)
{
$this->defaultEventCategoryID = $defaultEventCategoryID;
+ return $this;
+ }
+
+ public function getPoolID()
+ {
+ return $this->poolID;
+ }
+
+ public function setPoolID($poolID)
+ {
+ $this->poolID = $poolID;
+ return $this;
}
public function init()
@@ -148,23 +165,23 @@ class Application_Form_EventAdd extends Zend_Form
'label' => 'Repeat:',
'value'=>array(0,1),
));
-
+
$this->addElement('select', 'repeatType', array(
'multioptions' => array(
'day' => 'Daily',
'week' => 'Once a week',
'week2' => 'Every couple of weeks',
'month' => 'Every month',
- ),
+ ),
'required' => false,
'label' => 'Repeat Type:',
));
-
+
$this->addElement('select', 'repeatOption', array(
'multioptions' => array(
'after' => 'After',
'date' => 'Date',
- ),
+ ),
'required' => false,
'label' => 'Repeat End:',
));
@@ -197,29 +214,31 @@ class Application_Form_EventAdd extends Zend_Form
'label' => 'Note:',
));
- $poolfield = $this->createElement('select','pbs_poolID');
- $poolfield ->setLabel('Pool:');
+ if(!isset($this->poolID)) {
+ $poolfield = $this->createElement('select','pbs_poolID');
+ $poolfield ->setLabel('Pool:');
- if(count($this->poollist)>0){
- foreach($this->poollist as $pool => $p){
- $poolfield->addMultiOption($p->getID(), $p->getTitle());
+ if(count($this->poollist)>0){
+ foreach($this->poollist as $pool => $p){
+ $poolfield->addMultiOption($p->getID(), $p->getTitle());
+ }
}
- }
- $poolfield->setRegisterInArrayValidator(false);
- $this->addElement($poolfield);
+ $poolfield->setRegisterInArrayValidator(false);
+ $this->addElement($poolfield);
- $bootosfield = $this->createElement('select','pbs_bootosID');
- $bootosfield ->setLabel('BootOS:');
+ $bootosfield = $this->createElement('select','pbs_bootosID');
+ $bootosfield ->setLabel('BootOS:');
- if(count($this->bootoslist)>0){
- foreach($this->bootoslist as $bootos => $b){
- $bootosfield->addMultiOption($b->getID(), $b->getTitle());
+ if(count($this->bootoslist)>0){
+ foreach($this->bootoslist as $bootos => $b){
+ $bootosfield->addMultiOption($b->getID(), $b->getTitle());
+ }
}
- }
- $bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
+ $bootosfield->setRegisterInArrayValidator(false);
+ $this->addElement($bootosfield);
+ }
$this->addElement('submit', 'add', array(
'required' => false,