mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
NavigationController: Redirect to the shared overview if its the referrer..
..when editing a navigation item. refs #5600
This commit is contained in:
parent
6aecfe6959
commit
4d303e7121
@ -188,9 +188,10 @@ class NavigationController extends Controller
|
|||||||
public function editAction()
|
public function editAction()
|
||||||
{
|
{
|
||||||
$itemName = $this->params->getRequired('name');
|
$itemName = $this->params->getRequired('name');
|
||||||
|
$referrer = $this->params->get('referrer', 'index');
|
||||||
|
|
||||||
$form = new NavigationConfigForm();
|
$form = new NavigationConfigForm();
|
||||||
$form->setRedirectUrl('navigation');
|
$form->setRedirectUrl($referrer === 'shared' ? 'navigation/shared' : 'navigation');
|
||||||
$form->setItemTypes($this->listItemTypes());
|
$form->setItemTypes($this->listItemTypes());
|
||||||
$form->setTitle(sprintf($this->translate('Edit Navigation Item %s'), $itemName));
|
$form->setTitle(sprintf($this->translate('Edit Navigation Item %s'), $itemName));
|
||||||
$form->setUser($this->Auth()->getUser());
|
$form->setUser($this->Auth()->getUser());
|
||||||
|
@ -24,7 +24,10 @@
|
|||||||
<td><?= $this->qlink(
|
<td><?= $this->qlink(
|
||||||
$name,
|
$name,
|
||||||
'navigation/edit',
|
'navigation/edit',
|
||||||
array('name' => $name),
|
array(
|
||||||
|
'name' => $name,
|
||||||
|
'referrer' => 'shared'
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'title' => sprintf($this->translate('Edit shared navigation item %s'), $name)
|
'title' => sprintf($this->translate('Edit shared navigation item %s'), $name)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user