From 239d8e6e0e821256a05a5c3e3b98af3ad13fbe1f Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Thu, 8 Sep 2011 17:22:18 +0200 Subject: immediate events --- application/forms/EventAdd.php | 65 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'application/forms/EventAdd.php') diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php index 8d10686..ed62d74 100644 --- a/application/forms/EventAdd.php +++ b/application/forms/EventAdd.php @@ -112,9 +112,10 @@ class Application_Form_EventAdd extends Zend_Form )); $this->addElement('checkbox', 'immediate', array( - 'required' => false, - 'label' => 'Immediate Event:', - 'value'=>array(0,1), + 'onchange' => 'immediateChanged("immediate")', + 'required' => false, + 'label' => 'Immediate Event:', + 'value' => array(0,1), )); $this->addElement('text', 'start', array( @@ -156,51 +157,51 @@ class Application_Form_EventAdd extends Zend_Form 'required' => false, 'label' => 'Repeat end:', 'value' => 'mm/dd/yyyy H:min' - )); + )); - $this->addElement('text', 'participants', array( + $this->addElement('text', 'participants', array( 'filters' => array('StringTrim'), 'validators' => array( - array('StringLength', false, array(0, 40)), - ), + array('StringLength', false, array(0, 40)), + ), 'required' => false, 'label' => 'Participants:', - )); + )); - $this->addElement('text', 'note', array( + $this->addElement('text', 'note', array( 'filters' => array('StringTrim'), 'validators' => array( - array('StringLength', false, array(0, 140)), - ), + array('StringLength', false, array(0, 140)), + ), 'required' => false, 'label' => 'Note:', - )); + )); - $poolfield = $this->createElement('select','pbs_poolID'); - $poolfield ->setLabel('Pool:'); + $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( + $this->addElement('submit', 'add', array( 'required' => false, 'ignore' => true, 'label' => 'Create Event' @@ -210,7 +211,7 @@ class Application_Form_EventAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="javascript:history.back();"', + 'onclick' => 'location.href="/event/"', )); echo '