CC-5626: Context menu -> Edit -> Doesn't populate show forms properly
This commit is contained in:
parent
d056ee8c2e
commit
310cfddd3a
1 changed files with 21 additions and 20 deletions
|
@ -128,15 +128,20 @@ class Application_Service_CalendarService
|
|||
|
||||
$excludeIds = $this->ccShow->getEditedRepeatingInstanceIds();
|
||||
|
||||
$isRepeating = true;
|
||||
$isRepeating = $this->ccShow->isRepeating();
|
||||
$populateInstance = false;
|
||||
if (in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
||||
if ($isRepeating && in_array($this->ccShowInstance->getDbId(), $excludeIds)) {
|
||||
$populateInstance = true;
|
||||
$isRepeating = false;
|
||||
}
|
||||
|
||||
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
|
||||
if ($isRepeating) {
|
||||
if ($populateInstance) {
|
||||
$menu["edit"] = array(
|
||||
"name" => _("Edit Show"),
|
||||
"icon" => "edit",
|
||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||
} else {
|
||||
$menu["edit"] = array(
|
||||
"name" => _("Edit"),
|
||||
"icon" => "edit",
|
||||
|
@ -151,11 +156,7 @@ class Application_Service_CalendarService
|
|||
"name" => _("Edit This Instance"),
|
||||
"icon" => "edit",
|
||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||
} elseif ($populateInstance) {
|
||||
$menu["edit"] = array(
|
||||
"name" => _("Edit Show"),
|
||||
"icon" => "edit",
|
||||
"url" => $baseUrl."Schedule/populate-repeating-show-instance-form");
|
||||
}
|
||||
} else {
|
||||
$menu["edit"] = array(
|
||||
"name"=> _("Edit Show"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue