mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT "Readonly" behaviour for CMS tabs
This commit is contained in:
parent
d504e9e634
commit
91e4fde96f
@ -933,7 +933,16 @@ jQuery.noConflict();
|
|||||||
return false;
|
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 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
|||||||
_t('Member.INTERFACELANG', "Interface Language", 'Language of the CMS'),
|
_t('Member.INTERFACELANG', "Interface Language", 'Language of the CMS'),
|
||||||
i18n::get_existing_translations()
|
i18n::get_existing_translations()
|
||||||
));
|
));
|
||||||
|
|
||||||
$mainFields->removeByName('Bounced');
|
$mainFields->removeByName('Bounced');
|
||||||
$mainFields->removeByName('RememberLoginToken');
|
$mainFields->removeByName('RememberLoginToken');
|
||||||
$mainFields->removeByName('AutoLoginHash');
|
$mainFields->removeByName('AutoLoginHash');
|
||||||
@ -1181,6 +1181,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
|||||||
$fields->addFieldToTab('Root.Permissions', $permissionsField);
|
$fields->addFieldToTab('Root.Permissions', $permissionsField);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$permissionsTab = $fields->fieldByName("Root")->fieldByName('Permissions');
|
||||||
|
if($permissionsTab) $permissionsTab->addExtraClass('readonly');
|
||||||
|
|
||||||
$defaultDateFormat = Zend_Locale_Format::getDateFormat($this->Locale);
|
$defaultDateFormat = Zend_Locale_Format::getDateFormat($this->Locale);
|
||||||
$dateFormatMap = array(
|
$dateFormatMap = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user