This commit is contained in:
Björn Fromme
2025-02-27 19:21:12 +01:00
parent f5d3619c4a
commit ac498f9040
15 changed files with 311 additions and 185 deletions
+16 -2
View File
@@ -72,7 +72,14 @@
{%- if attr.disabled is defined and attr.disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
{%- endif -%}
<input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
{%- set tooltip = null -%}
{%- if attr.tooltip is defined -%}
{%- set tooltip = attr.tooltip -%}
{%- set attr = attr|filter((v, k) => k != 'tooltip') -%}
{%- endif -%}
<div{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}>
<input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
</div>
{%- endblock checkbox_widget -%}
{%- block radio_widget -%}
@@ -83,7 +90,14 @@
{%- if attr.disabled is defined and attr.disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
{%- endif -%}
<input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
{%- set tooltip = null -%}
{%- if attr.tooltip is defined -%}
{%- set tooltip = attr.tooltip -%}
{%- set attr = attr|filter((v, k) => k != 'tooltip') -%}
{%- endif -%}
<div{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}>
<input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
</div>
{%- endblock radio_widget -%}
{% block checkbox_row %}