From 7aac92a86fcf484e90c82b79e187ea19b0aff0a1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 25 Jan 2016 07:17:16 +0100 Subject: [PATCH] Fix tabs of new/update/remove dashlet --- .../controllers/DashboardController.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index dd4ffbb16..30f110333 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -37,7 +37,11 @@ class DashboardController extends ActionController public function newDashletAction() { $form = new DashletForm(); - $this->createTabs(); + $this->getTabs()->add('new-dashlet', array( + 'active' => true, + 'label' => $this->translate('New Dashlet'), + 'url' => Url::fromRequest() + )); $dashboard = $this->dashboard; $form->setDashboard($dashboard); if ($this->_request->getParam('url')) { @@ -77,7 +81,11 @@ class DashboardController extends ActionController public function updateDashletAction() { - $this->createTabs(); + $this->getTabs()->add('update-dashlet', array( + 'active' => true, + 'label' => $this->translate('Update Dashlet'), + 'url' => Url::fromRequest() + )); $dashboard = $this->dashboard; $form = new DashletForm(); $form->setDashboard($dashboard); @@ -145,7 +153,11 @@ class DashboardController extends ActionController public function removeDashletAction() { $form = new ConfirmRemovalForm(); - $this->createTabs(); + $this->getTabs()->add('remove-dashlet', array( + 'active' => true, + 'label' => $this->translate('Remove Dashlet'), + 'url' => Url::fromRequest() + )); $dashboard = $this->dashboard; if (! $this->_request->getParam('pane')) { throw new Zend_Controller_Action_Exception(