CC-3581: Calendar->It should not be possible to change the duration for
the recorded show - "When" section is disabled when editting rebroadcasting show
This commit is contained in:
parent
5da7d42290
commit
ab7da1ce90
|
@ -263,7 +263,11 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$menu["edit"]["items"]["instance"] = array("name"=> "Edit Show Instance", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
}else{
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
if($instance->isRebroadcast()){
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"rebroadcast", "url" => "/Schedule/edit-show");
|
||||
}else{
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"all", "url" => "/Schedule/edit-show");
|
||||
}
|
||||
}
|
||||
if($isAdminOrPM){
|
||||
$menu["cancel"] = array("name"=> "Cancel Current Show", "icon" => "delete");
|
||||
|
@ -280,7 +284,11 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$menu["edit"]["items"]["instance"] = array("name"=> "Edit Show Instance", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
$menu["edit"]["items"]["all"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
}else{
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "url" => "/Schedule/edit-show");
|
||||
if($instance->isRebroadcast()){
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"rebroadcast", "url" => "/Schedule/edit-show");
|
||||
}else{
|
||||
$menu["edit"] = array("name"=> "Edit Show", "icon" => "edit", "_type"=>"all", "url" => "/Schedule/edit-show");
|
||||
}
|
||||
}
|
||||
|
||||
if ($instance->getShow()->isRepeating() && $isAdminOrPM) {
|
||||
|
@ -433,7 +441,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$showInstanceId = $this->_getParam('id');
|
||||
// $type is used to determine if this edit is for the specific instance or for all
|
||||
// repeating shows. It's value is either "instance" or "all"
|
||||
// repeating shows. It's value is either "instance","rebroadcast", or "all"
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
try{
|
||||
|
@ -586,6 +594,10 @@ 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;
|
||||
|
|
|
@ -317,7 +317,7 @@ $(document).ready(function() {
|
|||
edit.all.callback = callback;
|
||||
}else{
|
||||
callback = function() {
|
||||
$.get(oItems.edit.url, {format: "json", id: data.id, type: "all"}, function(json){
|
||||
$.get(oItems.edit.url, {format: "json", id: data.id, type: oItems.edit._type}, function(json){
|
||||
beginEditShow(json);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue