From c24a040689253d81fd8fd81b304a2cc08887d1a3 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 14 Jan 2015 14:34:14 -0500 Subject: [PATCH] Fixed my SuperAdmin_Only decorator --- airtime_mvc/application/forms/GeneralPreferences.php | 2 +- airtime_mvc/application/forms/helpers/CustomDecorators.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index 0a6b2335c..fd1e00a7a 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -104,7 +104,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm monospace;', 'value' => self::getWidgetCode(), )); - $this->getElement('widgetCode')->addDecorator(new Airtime_Decorator_SuperAdmin_Only()); + $locale = new Zend_Form_Element_Select("locale"); $locale->setLabel(_("Default Language")); $locale->setMultiOptions(Application_Model_Locale::getLocales()); diff --git a/airtime_mvc/application/forms/helpers/CustomDecorators.php b/airtime_mvc/application/forms/helpers/CustomDecorators.php index 316774b89..27a3db99f 100644 --- a/airtime_mvc/application/forms/helpers/CustomDecorators.php +++ b/airtime_mvc/application/forms/helpers/CustomDecorators.php @@ -5,7 +5,7 @@ class Airtime_Decorator_SuperAdmin_Only extends Zend_Form_Decorator_Abstract public function render($content) { $currentUser = Application_Model_User::getCurrentUser(); - if (!$currentUser->isSuperAdmin()) { + if ($currentUser->isSuperAdmin()) { return $content; } else { return "";