summaryrefslogtreecommitdiffstats
path: root/application/forms/EventEdit.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms/EventEdit.php')
-rwxr-xr-xapplication/forms/EventEdit.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index 1e1ce39..1c1e592 100755
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -164,6 +164,7 @@ class Application_Form_EventEdit extends Zend_Form
array('StringLength', false, array(0, 19)),
array('Date', false, array('format' => 'mm/dd/yyyy h:i a')),
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
+ array('EventOverlapping', false, array('poolID' => $this->params['pbs_poolID'], 'start' => $this->getElement('start')->getValue())),
),
'required' => false,
'label' => 'End:',
@@ -177,6 +178,7 @@ class Application_Form_EventEdit extends Zend_Form
array('StringLength', false, array(0, 19)),
array('Date', false, array('format' => 'mm/dd/yyyy h:i a')),
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
+ array('EventOverlapping', false, array('poolID' => $this->params['pbs_poolID'], 'start' => $this->getElement('start')->getValue())),
),
'required' => false,
'label' => 'End:',
@@ -184,8 +186,6 @@ class Application_Form_EventEdit extends Zend_Form
));
$this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validate/', 'validate');
}
- $this->getElement('start')->addValidator(new Poolctrl_Validate_EventOverlapping(array('end' => $this->getElement('end')->getValue(), 'poolID' => $this->params['pbs_poolID'])));
- $this->getElement('start')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validate/', 'validate');
if( $this->params['repeat'] == 1) {
$this->addElement('checkbox', 'repeat', array(
@@ -398,4 +398,4 @@ class Application_Form_EventEdit extends Zend_Form
'onclick' => 'location.href="/event/"',
));
}
-} \ No newline at end of file
+}