Skip to content
Permalink
Browse files

ENHANCEMENT "Readonly" behaviour for CMS tabs

  • Loading branch information...
chillu committed Sep 28, 2012
1 parent d504e9e commit 91e4fde96fb43420c748737f1e351947396c0057
Showing with 14 additions and 2 deletions.
  1. +10 −1 admin/javascript/LeftAndMain.js
  2. +4 −1 security/Member.php
@@ -933,7 +933,16 @@ jQuery.noConflict();
return false;
}
},
selected: (selectedTab.index() != -1) ? selectedTab.index() : 0
selected: (selectedTab.index() != -1) ? selectedTab.index() : 0,
show: function(e, ui) {
// Usability: Hide actions for "readonly" tabs (which don't contain any editable fields)
var actions = $(this).closest('form').find('.Actions');
if($(ui.tab).closest('li').hasClass('readonly')) {
actions.fadeOut();
} else {
actions.show();
}
}
});
},

@@ -1128,7 +1128,7 @@ public function getCMSFields() {
_t('Member.INTERFACELANG', "Interface Language", 'Language of the CMS'),
i18n::get_existing_translations()
));
$mainFields->removeByName('Bounced');
$mainFields->removeByName('RememberLoginToken');
$mainFields->removeByName('AutoLoginHash');
@@ -1181,6 +1181,9 @@ public function getCMSFields() {
$fields->addFieldToTab('Root.Permissions', $permissionsField);
}
}
$permissionsTab = $fields->fieldByName("Root")->fieldByName('Permissions');
if($permissionsTab) $permissionsTab->addExtraClass('readonly');
$defaultDateFormat = Zend_Locale_Format::getDateFormat($this->Locale);
$dateFormatMap = array(

0 comments on commit 91e4fde

Please sign in to comment.
You can’t perform that action at this time.