collections

This commit is contained in:
Benjamin Dalsass
2025-12-03 17:47:22 +01:00
parent b1129f19d7
commit 4620710f5a
8 changed files with 60 additions and 40 deletions

View File

@@ -79,6 +79,7 @@
{%- endblock form_rows -%}
{%- block collection_widget -%}
<collection-element>
{% if prototype is defined and not prototype.rendered %}
{%- set attr = attr|merge({'data-prototype': form_row(prototype), 'class': name, 'data-index': form|length > 0 ? form|last.vars.name + 1 : 0 }) -%}
{% endif %}
@@ -88,6 +89,8 @@
<button type="button" class="add_item_link ibo-button ibo-button ibo-is-regular " data-collection-holder-class="{{ name }}">{{ button_label|dict_s }}</button>
</div>
{% endif %}
</collection-element>
{%- endblock collection_widget -%}
{%- block form_label_content -%}

View File

@@ -17,4 +17,4 @@
{% UITurboStream Replace { sTarget: current_form.vars.id} %}
{{ form_widget(current_form) }}
{% EndUITurboStream %}
{% endif %}
{% endif %}