From 97bbd7e604455e29f5eb192f522ed9c15b454548 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Thu, 8 Sep 2011 15:44:14 +0200 Subject: verschiedenes --- application/controllers/EventController.php | 11 +++++++++-- application/forms/EventEdit.php | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php index fdea2db..5bf02a0 100644 --- a/application/controllers/EventController.php +++ b/application/controllers/EventController.php @@ -416,6 +416,9 @@ class EventController extends Zend_Controller_Action if($this->getRequest()->getParam('end')) { $this->getRequest()->setParam('end', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('end')))); } + if($this->getRequest()->getParam('repeatEnd')) { + $this->getRequest()->setParam('repeatEnd', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('repeatEnd')))); + } if($event->getPbs_bootmenuID()) { $bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID()); unset($bootmenuApiResult); @@ -489,9 +492,13 @@ class EventController extends Zend_Controller_Action $this->getRequest()->setParam('title', $event->getTitle()); $this->getRequest()->setParam('immediate', $event->getImmediate()); $this->getRequest()->setParam('start', $event->getStart()); - $this->getRequest()->setParam('end', $event->getEnd()); + if($event->getEnd()) { + $this->getRequest()->setParam('end', $event->getEnd()); + } $this->getRequest()->setParam('repeat', $event->getRepeat()); - $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd()); + if($event->getRepeatEnd()) { + $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd()); + } $this->getRequest()->setParam('participants', $event->getParticipants()); $this->getRequest()->setParam('category', $event->getCategory()); $this->getRequest()->setParam('note', $event->getNote()); diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php index b49b8f9..826bcfd 100644 --- a/application/forms/EventEdit.php +++ b/application/forms/EventEdit.php @@ -131,8 +131,9 @@ class Application_Form_EventEdit extends Zend_Form array('Date', false, array('format' => 'mm/dd/yyyy H:i')), array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())), ), - 'required' => false, - 'label' => 'End:', + 'required' => false, + 'label' => 'End:', + 'value' => 'mm/dd/yyyy H:min', )); $this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate'); } -- cgit v1.2.3-55-g7522