Fixed my SuperAdmin_Only decorator

This commit is contained in:
Albert Santoni 2015-01-14 14:34:14 -05:00
parent d5b969f94f
commit c24a040689
2 changed files with 2 additions and 2 deletions

View File

@ -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());

View File

@ -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 "";