Notification: fix redirect after delete

fixes #1042
This commit is contained in:
Thomas Gelf 2017-07-28 09:56:53 +02:00
parent 8276f19ab7
commit ecd91d8bff
1 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use Icinga\Module\Director\Web\Controller\ObjectController;
use Icinga\Module\Director\Objects\IcingaHost;
use Icinga\Module\Director\Objects\IcingaNotification;
use Icinga\Module\Director\Objects\IcingaService;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
class NotificationController extends ObjectController
{
@ -33,6 +34,18 @@ class NotificationController extends ObjectController
}
}
/**
* @param DirectorObjectForm $form
*/
protected function beforeHandlingEditRequest($form)
{
if ($this->object->isTemplate()) {
$form->setListUrl('director/notifications/templates');
} else {
$form->setListUrl('director/notifications/applyrules');
}
}
protected function loadObject()
{
if ($this->object === null) {