This commit is contained in:
drigato 2015-04-15 10:50:57 -04:00
commit d5a29398c6
3 changed files with 20 additions and 4 deletions

View File

@ -12,4 +12,18 @@ class Airtime_Decorator_SuperAdmin_Only extends Zend_Form_Decorator_Abstract
return "";
}
}
}
/** Hide a Zend_Form_Element unless you're logged in as an Admin or SuperAdmin. */
class Airtime_Decorator_Admin_Only extends Zend_Form_Decorator_Abstract
{
public function render($content)
{
$currentUser = Application_Model_User::getCurrentUser();
if ($currentUser->isSuperAdmin() || $currentUser->isAdmin()) {
return $content;
} else {
return "";
}
}
}

View File

@ -484,7 +484,7 @@ fieldset.plain {
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
}
input[readonly]{
input[readonly], textarea[readonly] {
background-color:#b1b1b1
}

View File

@ -468,9 +468,11 @@ var AIRTIME = (function(AIRTIME){
}
a = oData.ColReorder;
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
if (a) {
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
}
}
}