Skip to content

Commit

Permalink
Add tab for new, update and remove user backend
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 30, 2015
1 parent be3c43e commit 2059a06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
25 changes: 10 additions & 15 deletions application/controllers/ConfigController.php
Expand Up @@ -213,13 +213,13 @@ public function createuserbackendAction()
{
$this->assertPermission('config/application/userbackend');
$form = new UserBackendConfigForm();
$form->setRedirectUrl('config/userbackend');
$form->setTitle($this->translate('Create New User Backend'));
$form->addDescription($this->translate(
'Create a new backend for authenticating your users. This backend'
. ' will be added at the end of your authentication order.'
));
$form->setIniConfig(Config::app('authentication'));
$form
->setRedirectUrl('config/userbackend')
->addDescription($this->translate(
'Create a new backend for authenticating your users. This backend'
. ' will be added at the end of your authentication order.'
))
->setIniConfig(Config::app('authentication'));

try {
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
Expand Down Expand Up @@ -249,8 +249,7 @@ public function createuserbackendAction()
});
$form->handleRequest();

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

/**
Expand All @@ -263,7 +262,6 @@ public function edituserbackendAction()

$form = new UserBackendConfigForm();
$form->setRedirectUrl('config/userbackend');
$form->setTitle(sprintf($this->translate('Edit User Backend %s'), $backendName));
$form->setIniConfig(Config::app('authentication'));
$form->setOnSuccess(function (UserBackendConfigForm $form) use ($backendName) {
try {
Expand Down Expand Up @@ -294,8 +292,7 @@ function ($v) {
$this->httpNotFound(sprintf($this->translate('User backend "%s" not found'), $backendName));
}

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

/**
Expand All @@ -310,7 +307,6 @@ public function removeuserbackendAction()
$backendForm->setIniConfig(Config::app('authentication'));
$form = new ConfirmRemovalForm();
$form->setRedirectUrl('config/userbackend');
$form->setTitle(sprintf($this->translate('Remove User Backend %s'), $backendName));
$form->setOnSuccess(function (ConfirmRemovalForm $form) use ($backendName, $backendForm) {
try {
$backendForm->delete($backendName);
Expand All @@ -328,8 +324,7 @@ public function removeuserbackendAction()
});
$form->handleRequest();

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

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

This file was deleted.

0 comments on commit 2059a06

Please sign in to comment.