wip
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user