Skip to content

Commit 21d5706

Browse files
(Host|Service)Controller: Fix tab activation
- Set the outer tab as active. Previously, the inner tab was activated in the setTitleTab method, but the outer tab does not know about the state of inner tabs. So whenever sendMultipartUpdate() -> getActiveTab() was called, the retured value was always null.
1 parent 103482c commit 21d5706

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

application/controllers/HostController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,7 @@ protected function setTitleTab(string $name)
478478
$tab = $this->createTabs()->get($name);
479479

480480
if ($tab !== null) {
481-
$tab->setActive();
482-
483-
$this->setTitle($tab->getLabel());
481+
$this->getTabs()->activate($name);
484482
}
485483
}
486484

application/controllers/ServiceController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,7 @@ protected function setTitleTab(string $name)
450450
$tab = $this->createTabs()->get($name);
451451

452452
if ($tab !== null) {
453-
$tab->setActive();
454-
455-
$this->setTitle($tab->getLabel());
453+
$this->getTabs()->activate($name);
456454
}
457455
}
458456

0 commit comments

Comments
 (0)