summaryrefslogtreecommitdiffstats
path: root/application/forms/EventAdd.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms/EventAdd.php')
-rwxr-xr-xapplication/forms/EventAdd.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 0aee9e0..6f579b5 100755
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -168,7 +168,7 @@ class Application_Form_EventAdd extends Zend_Form
'label' => 'Immediate Event:',
'value' => array(0,1),
));
-
+
$this->addElement('checkbox', 'force', array(
'required' => false,
'label' => 'Force event:',
@@ -185,6 +185,7 @@ class Application_Form_EventAdd extends Zend_Form
'label' => 'Start:',
'value' => $this->start,
));
+ $this->getElement('start')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
$this->addElement('text', 'end', array(
'filters' => array('StringTrim'),
@@ -198,6 +199,7 @@ class Application_Form_EventAdd extends Zend_Form
'value' => $this->end,
));
$this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
+ $this->getElement('start')->addValidator(new Poolctrl_Validate_EventOverlapping(), array('end' => $this->getElement('end')->getValue()));
$this->addElement('checkbox', 'repeat', array(
'onchange' => 'repeatChanged("repeat")',