fix: enforce mutability checks for all fields

This commit is contained in:
Björn Fromme
2026-03-16 12:03:00 +01:00
parent e6880b7fed
commit 9cef24f827
3 changed files with 67 additions and 3 deletions
+6 -2
View File
@@ -205,7 +205,9 @@
<div{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}>
{%- if attr.readonly is defined %}
<div class="cursor-not-allowed">
{{ parent() }}
<div class="pointer-events-none">
{{ parent() }}
</div>
</div>
{% else %}
{{ parent() }}
@@ -223,6 +225,9 @@
'hx-swap': attr['hx-swap']
}) -%}
{%- endif -%}
{%- if attr.readonly is defined and child.vars.attr.readonly is not defined -%}
{%- set child_attr = child_attr|merge({'readonly': true}) -%}
{%- endif -%}
{%- if child.vars.attr['data-tooltip'] is defined -%}
{%- set child_attr = child_attr|merge({'data-tooltip': child.vars.attr['data-tooltip']}) -%}
{%- endif -%}
@@ -358,4 +363,3 @@
</div>
</div>
{% endblock %}