mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 12:54:26 +02:00
parent
be3c43ef77
commit
2059a06105
@ -213,13 +213,13 @@ class ConfigController extends Controller
|
|||||||
{
|
{
|
||||||
$this->assertPermission('config/application/userbackend');
|
$this->assertPermission('config/application/userbackend');
|
||||||
$form = new UserBackendConfigForm();
|
$form = new UserBackendConfigForm();
|
||||||
$form->setRedirectUrl('config/userbackend');
|
$form
|
||||||
$form->setTitle($this->translate('Create New User Backend'));
|
->setRedirectUrl('config/userbackend')
|
||||||
$form->addDescription($this->translate(
|
->addDescription($this->translate(
|
||||||
'Create a new backend for authenticating your users. This backend'
|
'Create a new backend for authenticating your users. This backend'
|
||||||
. ' will be added at the end of your authentication order.'
|
. ' will be added at the end of your authentication order.'
|
||||||
));
|
))
|
||||||
$form->setIniConfig(Config::app('authentication'));
|
->setIniConfig(Config::app('authentication'));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||||
@ -249,8 +249,7 @@ class ConfigController extends Controller
|
|||||||
});
|
});
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->renderForm($form, $this->translate('New User Backend'));
|
||||||
$this->render('form');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -263,7 +262,6 @@ class ConfigController extends Controller
|
|||||||
|
|
||||||
$form = new UserBackendConfigForm();
|
$form = new UserBackendConfigForm();
|
||||||
$form->setRedirectUrl('config/userbackend');
|
$form->setRedirectUrl('config/userbackend');
|
||||||
$form->setTitle(sprintf($this->translate('Edit User Backend %s'), $backendName));
|
|
||||||
$form->setIniConfig(Config::app('authentication'));
|
$form->setIniConfig(Config::app('authentication'));
|
||||||
$form->setOnSuccess(function (UserBackendConfigForm $form) use ($backendName) {
|
$form->setOnSuccess(function (UserBackendConfigForm $form) use ($backendName) {
|
||||||
try {
|
try {
|
||||||
@ -294,8 +292,7 @@ class ConfigController extends Controller
|
|||||||
$this->httpNotFound(sprintf($this->translate('User backend "%s" not found'), $backendName));
|
$this->httpNotFound(sprintf($this->translate('User backend "%s" not found'), $backendName));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->renderForm($form, $this->translate('Update User Backend'));
|
||||||
$this->render('form');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -310,7 +307,6 @@ class ConfigController extends Controller
|
|||||||
$backendForm->setIniConfig(Config::app('authentication'));
|
$backendForm->setIniConfig(Config::app('authentication'));
|
||||||
$form = new ConfirmRemovalForm();
|
$form = new ConfirmRemovalForm();
|
||||||
$form->setRedirectUrl('config/userbackend');
|
$form->setRedirectUrl('config/userbackend');
|
||||||
$form->setTitle(sprintf($this->translate('Remove User Backend %s'), $backendName));
|
|
||||||
$form->setOnSuccess(function (ConfirmRemovalForm $form) use ($backendName, $backendForm) {
|
$form->setOnSuccess(function (ConfirmRemovalForm $form) use ($backendName, $backendForm) {
|
||||||
try {
|
try {
|
||||||
$backendForm->delete($backendName);
|
$backendForm->delete($backendName);
|
||||||
@ -328,8 +324,7 @@ class ConfigController extends Controller
|
|||||||
});
|
});
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->renderForm($form, $this->translate('Remove User Backend'));
|
||||||
$this->render('form');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
<div class="controls">
|
|
||||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<?= $form; ?>
|
|
||||||
</div>
|
|
Loading…
x
Reference in New Issue
Block a user