mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6528 from zacps/3310-permissions
Simplify permissions displayed when admin (fixes #3310)
This commit is contained in:
commit
a282b3f420
8
admin/client/dist/styles/bundle.css
vendored
8
admin/client/dist/styles/bundle.css
vendored
@ -7639,7 +7639,7 @@ h1{
|
||||
content:"z";
|
||||
}
|
||||
|
||||
.font-icon-cancel-circled:before{
|
||||
.font-icon-cancel-circled:before,.font-icon-disable-circled:before{
|
||||
content:"Q";
|
||||
}
|
||||
|
||||
@ -13510,7 +13510,7 @@ li.class-ErrorPage>a .jstree-pageicon{
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
.permissioncheckboxset .font-icon-cancel-circled,.permissioncheckboxset .font-icon-check-mark-circle,.permissioncheckboxsetfield_readonly .font-icon-cancel-circled,.permissioncheckboxsetfield_readonly .font-icon-check-mark-circle{
|
||||
.permissioncheckboxset .font-icon-cancel-circled,.permissioncheckboxset .font-icon-check-mark-circle,.permissioncheckboxset .font-icon-disable-circled,.permissioncheckboxsetfield_readonly .font-icon-cancel-circled,.permissioncheckboxsetfield_readonly .font-icon-check-mark-circle,.permissioncheckboxsetfield_readonly .font-icon-disable-circled{
|
||||
font-size:18px;
|
||||
position:relative;
|
||||
top:2px;
|
||||
@ -13524,6 +13524,10 @@ li.class-ErrorPage>a .jstree-pageicon{
|
||||
color:#d40404;
|
||||
}
|
||||
|
||||
.permissioncheckboxset .font-icon-disable-circle,.permissioncheckboxsetfield_readonly .font-icon-disable-circle{
|
||||
color:#545d67;
|
||||
}
|
||||
|
||||
.permissioncheckboxsetfield_readonly li,.permissioncheckboxset li{
|
||||
margin-bottom:4px;
|
||||
}
|
||||
|
@ -117,7 +117,8 @@
|
||||
content: "\7a";
|
||||
}
|
||||
|
||||
.font-icon-cancel-circled::before {
|
||||
.font-icon-cancel-circled::before,
|
||||
.font-icon-disable-circled::before {
|
||||
content: "\51";
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
}
|
||||
|
||||
.font-icon-check-mark-circle,
|
||||
.font-icon-cancel-circled {
|
||||
.font-icon-cancel-circled,
|
||||
.font-icon-disable-circled {
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
@ -36,6 +37,10 @@
|
||||
color: $brand-danger;
|
||||
}
|
||||
|
||||
.font-icon-disable-circle {
|
||||
color: $gray;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 4px;
|
||||
|
||||
|
@ -238,6 +238,11 @@ class PermissionCheckboxSetField extends FormField
|
||||
$inheritMessage = '<small>' . $inheritMessage . '</small>';
|
||||
$icon = ($checked) ? 'check-mark-circle' : 'cancel-circled';
|
||||
|
||||
// Inherited codes are shown as a gray x
|
||||
if (Permission::check('ADMIN') && $code != 'ADMIN') {
|
||||
$icon = 'disable-circled';
|
||||
}
|
||||
|
||||
// If the field is readonly, add a span that will replace the disabled checkbox input
|
||||
if ($this->readonly) {
|
||||
$options .= "<li class=\"$extraClass\">"
|
||||
|
Loading…
Reference in New Issue
Block a user