ObjectsController: fix redirect after deleting...

...multiple hosts or services
This commit is contained in:
Thomas Gelf 2017-07-21 13:26:59 +02:00
parent 8e7022258f
commit 374c328a5b
1 changed files with 4 additions and 3 deletions

View File

@ -69,12 +69,13 @@ abstract class ObjectsController extends ActionController
$objects = $this->loadMultiObjectsFromParams();
$formName = 'icinga' . $type;
/** @var IcingaMultiEditForm $form */
$form = $this->loadForm('IcingaMultiEdit')
$form = IcingaMultiEditForm::load()
->setObjects($objects)
->pickElementsFrom($this->loadForm($formName), $this->multiEdit);
if ($type === 'Service') {
$form->setListUrl('director/servicetemplate/hosts');
$form->setListUrl('director/services');
} elseif ($type === 'Host') {
$form->setListUrl('director/hosts');
}
$form->handleRequest();