diff --git a/assets/css/app.css b/assets/css/app.css index 61b01f81..37c57b8a 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -871,3 +871,10 @@ table.dataTable tr.selected td.select-checkbox:after, table.dataTable tr.selecte width: 100%; } +/*********************************************** + * Permission checkboxes + ***********************************************/ +.permission-checkbox:checked { + background-color: var(--bs-success); + border-color: var(--bs-success); +} \ No newline at end of file diff --git a/src/Form/Permissions/PermissionType.php b/src/Form/Permissions/PermissionType.php index d733417e..288b7e24 100644 --- a/src/Form/Permissions/PermissionType.php +++ b/src/Form/Permissions/PermissionType.php @@ -97,6 +97,9 @@ class PermissionType extends AbstractType 'mapped' => false, 'label' => $operation['label'] ?? null, 'disabled' => $options['disabled'], + 'attr' => [ + 'class' => 'permission-checkbox tristate', + ], 'label_attr' => [ 'class' => 'checkbox-inline opacity-100', ], diff --git a/templates/Form/permissionLayout.html.twig b/templates/Form/permissionLayout.html.twig index 74211da2..a9c76e86 100644 --- a/templates/Form/permissionLayout.html.twig +++ b/templates/Form/permissionLayout.html.twig @@ -4,7 +4,7 @@ {% if multi_checkbox %}
- + @@ -53,15 +53,15 @@
- +
- +
- +