CC-3864: Calendar -> Edit show: Can edit the start time of current playing show

- bug fix. In case of this error, we should maintain the original start time.
This commit is contained in:
James 2012-06-07 12:14:22 -04:00
parent dc4597e526
commit 3c7f3d52e1
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
// if edit action, check if original show start time is in the past. CC-3864
if($originalStartDate){
if($originalStartDate->getTimestamp() < $nowDateTime->getTimestamp()) {
$this->getElement('add_show_start_time')->setValue($originalStartDate->format("H:i"));
$this->getElement('add_show_start_date')->setValue($originalStartDate->format("Y-m-d"));
$this->getElement('add_show_start_time')->setErrors(array('Cannot modify start date/time of the show that is already started'));
$this->disableStartDateAndTime();
$valid = false;