CC-3663: Cannot edit rebroadcast show

-fixed
This commit is contained in:
James 2012-04-19 12:57:13 -04:00
parent 32eb80bdeb
commit ee7829d920
1 changed files with 17 additions and 15 deletions

View File

@ -441,7 +441,9 @@ class ScheduleController extends Zend_Controller_Action
unset($this->view->showContent);
}
public function populateShowInstanceFormAction(){
// we removed edit show instance option in menu item
// this feature is disabled in 2.1 and should be back in 2.2
/*public function populateShowInstanceFormAction(){
$formWhat = new Application_Form_AddShowWhat();
$formWho = new Application_Form_AddShowWho();
$formWhen = new Application_Form_AddShowWhen();
@ -498,15 +500,15 @@ class ScheduleController extends Zend_Controller_Action
$formRepeats->disable();
$formStyle->disable();
/*
$formRecord->disable();
$formAbsoluteRebroadcast->disable();
$formRebroadcast->disable();
*/
//$formRecord->disable();
//$formAbsoluteRebroadcast->disable();
//$formRebroadcast->disable();
$this->view->action = "edit-show-instance";
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
}
}*/
public function populateShowFormAction()
{
@ -520,12 +522,12 @@ class ScheduleController extends Zend_Controller_Action
// repeating shows. It's value is either "instance","rebroadcast", or "all"
$type = $this->_getParam('type');
if($type == "rebroadcast") {
$this->view->action = "edit-show-rebroadcast";
/*if($type == "rebroadcast") {
//$this->view->action = "edit-show-rebroadcast";
} else {
$this->view->action = "edit-show";
}
}*/
$this->view->action = "edit-show";
try{
$showInstance = new Application_Model_ShowInstance($showInstanceId);
}catch(Exception $e){
@ -679,10 +681,6 @@ class ScheduleController extends Zend_Controller_Action
$formRepeats->disable();
$formStyle->disable();
}
if($type == "rebroadcast"){
$formWhen->disable();
}
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
$this->view->entries = 5;
@ -777,6 +775,7 @@ class ScheduleController extends Zend_Controller_Action
if (!array_key_exists('add_show_start_time', $data)){
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
$data['add_show_start_time'] = $startTime->format("H:i");
$validateStartTime = false;
}
$validateStartDate = false;
}
@ -791,6 +790,9 @@ class ScheduleController extends Zend_Controller_Action
if (!$validateStartDate){
$this->view->when->getElement('add_show_start_date')->setOptions(array('disabled' => true));
}
if(!$validateStartTime){
$this->view->when->getElement('add_show_start_time')->setOptions(array('disabled' => true));
}
$this->view->rr->getElement('add_show_record')->setOptions(array('disabled' => true));
$this->view->addNewShow = false;
$this->view->form = $this->view->render('schedule/add-show-form.phtml');