From 3c7f3d52e198dd76e12b3d1dccf084bb012ac120 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 7 Jun 2012 12:14:22 -0400 Subject: [PATCH] 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. --- airtime_mvc/application/forms/AddShowWhen.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index fb0f361d4..270af52bf 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -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;