Skip to content

Commit

Permalink
(Host|Service)Controller: Fix tab activation
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
sukhwinder33445 committed Dec 18, 2024
1 parent 3f96fd3 commit 2762f6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions application/controllers/HostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,7 @@ protected function setTitleTab(string $name)
$tab = $this->createTabs()->get($name);

if ($tab !== null) {
$tab->setActive();

$this->setTitle($tab->getLabel());
$this->getTabs()->activate($name);
}
}

Expand Down
4 changes: 1 addition & 3 deletions application/controllers/ServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ protected function setTitleTab(string $name)
$tab = $this->createTabs()->get($name);

if ($tab !== null) {
$tab->setActive();

$this->setTitle($tab->getLabel());
$this->getTabs()->activate($name);
}
}

Expand Down

0 comments on commit 2762f6f

Please sign in to comment.