fix: correct handling of readonly checkboxes with tooltips

This commit is contained in:
Björn Fromme
2025-07-24 09:33:27 +02:00
parent 318a326fdb
commit 955dbd2f05
+2 -2
View File
@@ -105,8 +105,8 @@
{%- if form.vars.attr.tooltip is defined -%} {%- if form.vars.attr.tooltip is defined -%}
{%- set tooltip = form.vars.attr.tooltip -%} {%- set tooltip = form.vars.attr.tooltip -%}
{%- endif -%} {%- endif -%}
<div> <div class="{{ html_classes({ 'cursor-not-allowed': form.vars.attr.readonly is defined }) }}" {% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}>
<label for="{{ form.vars.id }}" class="{{ html_classes('relative flex items-start', { 'cursor-not-allowed pointer-events-none': form.vars.attr.readonly is defined }) }}"{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}> <label for="{{ form.vars.id }}" class="{{ html_classes('relative flex items-start', { 'pointer-events-none': form.vars.attr.readonly is defined }) }}">
<div class="flex h-6 items-center"> <div class="flex h-6 items-center">
{{ form_widget(form) }} {{ form_widget(form) }}
</div> </div>