summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/EventController.php2
-rw-r--r--application/forms/EventEdit.php12
-rw-r--r--application/models/Event.php2
3 files changed, 10 insertions, 6 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 813be9b..fd7858b 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -362,6 +362,7 @@ class EventController extends Zend_Controller_Action
$this->_helper->redirector('add', 'event');
return;
} else {
+ $params = $this->getRequest()->getParams();
$eventcategorylist = $this->eventcategoryMapper->fetchAll();
$bootOsApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getbootoss'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$bootOsXMLString = $bootOsApiResult['http-body'];
@@ -496,7 +497,6 @@ class EventController extends Zend_Controller_Action
$this->getRequest()->setParam('pbs_poolID', $event->getPbs_poolID());
$this->getRequest()->setParam('pbs_bootosID', $event->getPbs_bootosID());
$this->getRequest()->setParam('pbs_membershipID', $event->getPbs_membershipID());
- $params = $this->getRequest()->getParams();
$editForm = new Application_Form_EventEdit(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist , 'params' => $params));
}
$this->view->editForm = $editForm;
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index 379832a..41e9c11 100644
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -70,6 +70,7 @@ class Application_Form_EventEdit extends Zend_Form
}
$eventcategoryfield->setRegisterInArrayValidator(false);
+ $eventcategoryfield->setValue($this->params['category']);
$eventcategoryfield->setAttrib('onchange', "eventcategoryfieldChanged('category');");
$this->addElement($eventcategoryfield);
@@ -114,18 +115,21 @@ class Application_Form_EventEdit extends Zend_Form
'validators' => array(
array('StringLength', false, array(0, 16)),
array('Date', false, array('format' => 'mm/dd/yyyy H:i')),
+ array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
),
'required' => true,
'label' => 'End (mm/dd/yyyy H:min):',
'value' => date ('m/d/Y H:i', strtotime( $this->params['end'])),
));
+ $this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
if( $this->params['repeat'] == 1) {
$this->addElement('checkbox', 'repeat', array(
- 'required' => false,
- 'label' => 'Repeat:',
- 'value'=>array(0,1),
- 'checked' => 'checked',
+ 'required' => false,
+ 'onchange' => 'repeatChanged("repeat")',
+ 'label' => 'Repeat:',
+ 'value'=>array(0,1),
+ 'checked' => 'checked',
));
} else {
$this->addElement('checkbox', 'repeat', array(
diff --git a/application/models/Event.php b/application/models/Event.php
index 10d1f07..9033824 100644
--- a/application/models/Event.php
+++ b/application/models/Event.php
@@ -267,7 +267,7 @@ class Application_Model_Event
return $this;
}
- public function isRunning()
+ public function getRunning()
{
return $this->_running;
}