CC-2289:differentiate-between-time-and-duration

- some change in date populating rules
- change on start date/time triggers change in end date/time
- change on end date/time will triggers background turning into
red color to notify user that end date/time is earlier than
start date/time.
- need to do more work once I get img file from Vladmir
This commit is contained in:
james 2011-06-06 12:49:52 -04:00
parent 1dabbacca2
commit 6a15f51aac
4 changed files with 127 additions and 4 deletions

View file

@ -104,6 +104,9 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
}elseif(strpos($formData["add_show_duration"], 'h') !== false && intval(substr($formData["add_show_duration"], 0, strpos($formData["add_show_duration"], 'h'))) > 23) {
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration > 24h'));
$valid = false;
}elseif( strstr($formData["add_show_duration"], '-') ){
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration < 0m'));
$valid = false;
}
return $valid;