mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
NavigationConfigForm: Provide proper parents when editing a shared item
refs #5600
This commit is contained in:
parent
91601de398
commit
4b7fbdfa1f
@ -186,7 +186,11 @@ class NavigationConfigForm extends ConfigForm
|
|||||||
public function listAvailableParents($type)
|
public function listAvailableParents($type)
|
||||||
{
|
{
|
||||||
$shared = false;
|
$shared = false;
|
||||||
if (($checkbox = $this->getElement('shared')) !== null) {
|
$children = array();
|
||||||
|
if ($this->itemToLoad) {
|
||||||
|
$shared = $this->hasBeenShared($this->itemToLoad);
|
||||||
|
$children = $this->getFlattenedChildren($this->itemToLoad);
|
||||||
|
} elseif (($checkbox = $this->getElement('shared')) !== null) {
|
||||||
if ($checkbox->isChecked()) {
|
if ($checkbox->isChecked()) {
|
||||||
$shared = true;
|
$shared = true;
|
||||||
} else {
|
} else {
|
||||||
@ -195,8 +199,6 @@ class NavigationConfigForm extends ConfigForm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$children = $this->itemToLoad ? $this->getFlattenedChildren($this->itemToLoad) : array();
|
|
||||||
|
|
||||||
$names = array();
|
$names = array();
|
||||||
if ($shared) {
|
if ($shared) {
|
||||||
foreach ($this->getShareConfig() as $sectionName => $sectionConfig) {
|
foreach ($this->getShareConfig() as $sectionName => $sectionConfig) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user