From b15b04257bf619fad21f07d36efbfca060c7fa80 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 1 Oct 2015 00:10:53 +0200 Subject: [PATCH] Add tab for new resource refs #5543 --- application/controllers/ConfigController.php | 5 ++++- application/views/scripts/config/resource/create.phtml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 511bf98e2..8dbd9a92d 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -349,8 +349,11 @@ class ConfigController extends Controller public function createresourceAction() { $this->assertPermission('config/application/resources'); + $this->getTabs()->add('resources/new', array( + 'label' => $this->translate('New Resource'), + 'url' => Url::fromRequest() + ))->activate('resources/new'); $form = new ResourceConfigForm(); - $form->setTitle($this->translate('Create A New Resource')); $form->addDescription($this->translate('Resources are entities that provide data to Icinga Web 2.')); $form->setIniConfig(Config::app('resources')); $form->setRedirectUrl('config/resource'); diff --git a/application/views/scripts/config/resource/create.phtml b/application/views/scripts/config/resource/create.phtml index a53f51721..13a8ed9ed 100644 --- a/application/views/scripts/config/resource/create.phtml +++ b/application/views/scripts/config/resource/create.phtml @@ -1,6 +1,6 @@
- tabs->showOnlyCloseButton() ?> +
- -
\ No newline at end of file + +