parent
f960874dd4
commit
2bc7e4a5ff
|
@ -19,6 +19,7 @@ use Icinga\Forms\ConfirmRemovalForm;
|
||||||
use Icinga\Security\SecurityException;
|
use Icinga\Security\SecurityException;
|
||||||
use Icinga\Web\Controller;
|
use Icinga\Web\Controller;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
|
use Icinga\Web\Url;
|
||||||
use Icinga\Web\Widget;
|
use Icinga\Web\Widget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -381,6 +382,10 @@ class ConfigController extends Controller
|
||||||
public function removeresourceAction()
|
public function removeresourceAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('config/application/resources');
|
$this->assertPermission('config/application/resources');
|
||||||
|
$this->getTabs()->add('resources/remove', array(
|
||||||
|
'label' => $this->translate('Remove Resource'),
|
||||||
|
'url' => Url::fromRequest()
|
||||||
|
))->activate('resources/remove');
|
||||||
$form = new ConfirmRemovalForm(array(
|
$form = new ConfirmRemovalForm(array(
|
||||||
'onSuccess' => function ($form) {
|
'onSuccess' => function ($form) {
|
||||||
$configForm = new ResourceConfigForm();
|
$configForm = new ResourceConfigForm();
|
||||||
|
@ -401,7 +406,6 @@ class ConfigController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
$form->setTitle($this->translate('Remove Existing Resource'));
|
|
||||||
$form->setRedirectUrl('config/resource');
|
$form->setRedirectUrl('config/resource');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs->showOnlyCloseButton() ?>
|
<?= $tabs ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= $form; ?>
|
<?= $form ?>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue