Skip to content

Commit 5b09bed

Browse files
add role switch
1 parent 4a71188 commit 5b09bed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/Modules/app_role/app_role_update.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<td>{{ permission }}</td>
4040
<td>
4141
<div class="form-check form-switch">
42-
<input type="checkbox" class="form-check-input custom-control-input-permission"
42+
<input type="checkbox" role="switch" class="form-check-input custom-control-input-permission"
4343
data-url="{{ path('app_roles_permission', {'role': role.name, 'module': module, 'permission': permission}) }}"
4444
data-permission="{{ permission }}"
4545
id="{{ module }}-{{ permission }}"{% if permissions_saved[module] is defined and permission in permissions_saved[module] %} checked="checked"{% endif %}>

templates/bootstrap_5_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
{{- form_label(form, null, { widget: parent() }) -}}
165165
</div>
166166
{%- elseif 'switch-custom' in parent_label_class -%}
167-
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
167+
{%- set attr = attr|merge({role: 'switch', class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
168168
<div class="form-check form-switch{{ 'switch-inline' in parent_label_class ? ' custom-control-inline' }}">
169169
{{- form_label(form, null, { widget: parent() }) -}}
170170
</div>

0 commit comments

Comments
 (0)