summaryrefslogtreecommitdiffstats
path: root/application/forms/EventEdit.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-09-08 14:26:16 +0200
committerBjörn Geiger2011-09-08 14:26:16 +0200
commit91c838e2b97471befb0a72a7a960e45ac1d6c60d (patch)
tree5f56e9eaac11491c86b93cc7066ea6e331eb12d0 /application/forms/EventEdit.php
parentminor (diff)
downloadpoolctrl-91c838e2b97471befb0a72a7a960e45ac1d6c60d.tar.gz
poolctrl-91c838e2b97471befb0a72a7a960e45ac1d6c60d.tar.xz
poolctrl-91c838e2b97471befb0a72a7a960e45ac1d6c60d.zip
weitere Fehler korrigiert
Diffstat (limited to 'application/forms/EventEdit.php')
-rw-r--r--application/forms/EventEdit.php12
1 files changed, 8 insertions, 4 deletions
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(