From 91c838e2b97471befb0a72a7a960e45ac1d6c60d Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Thu, 8 Sep 2011 14:26:16 +0200 Subject: weitere Fehler korrigiert --- application/forms/EventEdit.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'application/forms/EventEdit.php') 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( -- cgit v1.2.3-55-g7522