GroupController: Use proper redirect urls when adding and removing groups
refs #8826
This commit is contained in:
parent
f86a05e0c3
commit
66611d4887
|
@ -11,6 +11,7 @@ use Icinga\Forms\Config\UserGroupForm;
|
||||||
use Icinga\Web\Controller;
|
use Icinga\Web\Controller;
|
||||||
use Icinga\Web\Form;
|
use Icinga\Web\Form;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget;
|
use Icinga\Web\Widget;
|
||||||
|
|
||||||
class GroupController extends Controller
|
class GroupController extends Controller
|
||||||
|
@ -106,10 +107,10 @@ class GroupController extends Controller
|
||||||
*/
|
*/
|
||||||
public function addAction()
|
public function addAction()
|
||||||
{
|
{
|
||||||
|
$backend = $this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible');
|
||||||
$form = new UserGroupForm();
|
$form = new UserGroupForm();
|
||||||
$form->setRepository(
|
$form->setRedirectUrl(Url::fromPath('group/list', array('backend' => $backend->getName())));
|
||||||
$this->getUserGroupBackend($this->params->getRequired('backend'), 'Icinga\Data\Extensible')
|
$form->setRepository($backend);
|
||||||
);
|
|
||||||
$form->add()->handleRequest();
|
$form->add()->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
@ -150,6 +151,7 @@ class GroupController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = new UserGroupForm();
|
$form = new UserGroupForm();
|
||||||
|
$form->setRedirectUrl(Url::fromPath('group/list', array('backend' => $backend->getName())));
|
||||||
$form->setRepository($backend);
|
$form->setRepository($backend);
|
||||||
$form->remove($groupName)->handleRequest();
|
$form->remove($groupName)->handleRequest();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue