mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
CommandActions: Expect an explicit redirect url
This commit is contained in:
parent
132047934d
commit
57a874df37
1 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\ToggleObjectFeaturesCommandFor
|
|||
use ipl\Html\HtmlString;
|
||||
use ipl\Orm\Model;
|
||||
use ipl\Orm\Query;
|
||||
use ipl\Web\Url;
|
||||
use LogicException;
|
||||
|
||||
/**
|
||||
|
|
@ -32,6 +33,7 @@ use LogicException;
|
|||
*
|
||||
* @method mixed fetchCommandTargets() Fetch command targets, \ipl\Orm\Query or \ipl\Orm\Model[]
|
||||
* @method object getFeatureStatus() Get status of toggleable features
|
||||
* @method Url getCommandTargetsUrl() Get url to view command targets, used as redirection target
|
||||
*/
|
||||
trait CommandActions
|
||||
{
|
||||
|
|
@ -114,6 +116,8 @@ trait CommandActions
|
|||
]);
|
||||
}
|
||||
|
||||
$form->setRedirectUrl($this->getCommandTargetsUrl());
|
||||
|
||||
$form->handleRequest();
|
||||
$this->addContent(HtmlString::create($form->render()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue