mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
CommandArguments: redirection after submission...
...and add 'back' link
This commit is contained in:
parent
4c46f07f2e
commit
3418a535ae
@ -29,9 +29,11 @@ class CommandController extends ObjectController
|
|||||||
$o = $this->object;
|
$o = $this->object;
|
||||||
$this->tabs()->activate('arguments');
|
$this->tabs()->activate('arguments');
|
||||||
$this->addTitle($this->translate('Command arguments: %s'), $o->getObjectName());
|
$this->addTitle($this->translate('Command arguments: %s'), $o->getObjectName());
|
||||||
|
|
||||||
$form = IcingaCommandArgumentForm::load()->setCommandObject($o);
|
$form = IcingaCommandArgumentForm::load()->setCommandObject($o);
|
||||||
if ($id = $p->shift('argument_id')) {
|
if ($id = $p->shift('argument_id')) {
|
||||||
|
$this->addBackLink('director/command/arguments', [
|
||||||
|
'name' => $p->get('name')
|
||||||
|
]);
|
||||||
$form->loadObject($id);
|
$form->loadObject($id);
|
||||||
}
|
}
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
@ -162,7 +162,10 @@ class IcingaCommandArgumentForm extends DirectorObjectForm
|
|||||||
}
|
}
|
||||||
$this->setSuccessUrl(
|
$this->setSuccessUrl(
|
||||||
'director/command/arguments',
|
'director/command/arguments',
|
||||||
array('name' => $cmd->getObjectName())
|
[
|
||||||
|
'argument_id' => $object->get('id'),
|
||||||
|
'name' => $cmd->getObjectName()
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->redirectOnSuccess($msg);
|
$this->redirectOnSuccess($msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user