Skip to content

Commit

Permalink
Add tab for new, update and remove user group backend
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 30, 2015
1 parent 2059a06 commit f3f7fa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 3 additions & 9 deletions application/controllers/UsergroupbackendController.php
Expand Up @@ -48,7 +48,6 @@ public function createAction()
{
$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) {
Expand All @@ -68,8 +67,7 @@ public function createAction()
});
$form->handleRequest();

$this->view->form = $form;
$this->render('form');
$this->renderForm($form, $this->translate('New User Group Backend'));
}

/**
Expand All @@ -81,7 +79,6 @@ public function editAction()

$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 {
Expand Down Expand Up @@ -111,8 +108,7 @@ function ($v) {
$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'));
}

/**
Expand All @@ -126,7 +122,6 @@ public function removeAction()
$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);
Expand All @@ -144,8 +139,7 @@ public function removeAction()
});
$form->handleRequest();

$this->view->form = $form;
$this->render('form');
$this->renderForm($form, $this->translate('Remove User Group Backend'));
}

/**
Expand Down
6 changes: 0 additions & 6 deletions application/views/scripts/usergroupbackend/form.phtml

This file was deleted.

0 comments on commit f3f7fa3

Please sign in to comment.