{% from "tungsten/forms/macros.html" import wrapper, ui_action %} {% call wrapper(field, v) %} {% set btn = 'tw-icon-btn h-7 w-7 ' ~ colors.ICON_BUTTON.gray %} {% if v.table %}
{% for f in v.row_fields %}{% endfor %} {% if not v.disabled %}{% endif %} {% for row in v.rows %} {% if row.key %}{% endif %} {% for f in v.row_fields %}{% endfor %} {% if not v.disabled %} {% endif %} {% endfor %}
{{ f.get_label(form) }}
{{ f.render(form, row.base) }}
{% if v.can_delete %}{{ ui_action(form, 'repeater.remove:' ~ v.path ~ ':' ~ row.index, __('Delete'), 'tw-icon-btn h-7 w-7 ' ~ colors.ICON_BUTTON.danger, 'trash-2') }}{% endif %}
{% else %} {% endif %} {% if not v.disabled and v.can_add %} {% if v.blocks %}
{% for b in v.blocks %} {% endfor %}
{% else %}
{{ ui_action(form, 'repeater.add:' ~ v.path, v.add_label, 'tw-btn tw-btn-sm ' ~ colors.BUTTON.gray) }}
{% endif %} {% endif %} {% endcall %}