From f3f7fa381bffd1309adabf459161956924391028 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 1 Oct 2015 00:36:32 +0200 Subject: [PATCH] Add tab for new, update and remove user group backend refs #5543 --- .../controllers/UsergroupbackendController.php | 12 +++--------- .../views/scripts/usergroupbackend/form.phtml | 6 ------ 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 application/views/scripts/usergroupbackend/form.phtml diff --git a/application/controllers/UsergroupbackendController.php b/application/controllers/UsergroupbackendController.php index b2fb1d960..7c40dbefb 100644 --- a/application/controllers/UsergroupbackendController.php +++ b/application/controllers/UsergroupbackendController.php @@ -48,7 +48,6 @@ class UsergroupbackendController extends Controller { $form = new UserGroupBackendForm(); $form->setRedirectUrl('usergroupbackend/list'); - $form->setTitle($this->translate('Create New User Group Backend')); $form->addDescription($this->translate('Create a new backend to associate users and groups with.')); $form->setIniConfig(Config::app('groups')); $form->setOnSuccess(function (UserGroupBackendForm $form) { @@ -68,8 +67,7 @@ class UsergroupbackendController extends Controller }); $form->handleRequest(); - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('New User Group Backend')); } /** @@ -81,7 +79,6 @@ class UsergroupbackendController extends Controller $form = new UserGroupBackendForm(); $form->setRedirectUrl('usergroupbackend/list'); - $form->setTitle(sprintf($this->translate('Edit User Group Backend %s'), $backendName)); $form->setIniConfig(Config::app('groups')); $form->setOnSuccess(function (UserGroupBackendForm $form) use ($backendName) { try { @@ -111,8 +108,7 @@ class UsergroupbackendController extends Controller $this->httpNotFound(sprintf($this->translate('User group backend "%s" not found'), $backendName)); } - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('Update User Group Backend')); } /** @@ -126,7 +122,6 @@ class UsergroupbackendController extends Controller $backendForm->setIniConfig(Config::app('groups')); $form = new ConfirmRemovalForm(); $form->setRedirectUrl('usergroupbackend/list'); - $form->setTitle(sprintf($this->translate('Remove User Group Backend %s'), $backendName)); $form->setOnSuccess(function (ConfirmRemovalForm $form) use ($backendName, $backendForm) { try { $backendForm->delete($backendName); @@ -144,8 +139,7 @@ class UsergroupbackendController extends Controller }); $form->handleRequest(); - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('Remove User Group Backend')); } /** diff --git a/application/views/scripts/usergroupbackend/form.phtml b/application/views/scripts/usergroupbackend/form.phtml deleted file mode 100644 index cbf06590d..000000000 --- a/application/views/scripts/usergroupbackend/form.phtml +++ /dev/null @@ -1,6 +0,0 @@ -
- showOnlyCloseButton(); ?> -
-
- -
\ No newline at end of file