update attributes in murph_collection_widget template

This commit is contained in:
Simon Vieille 2022-04-15 15:44:50 +02:00
parent 6bfbc1beca
commit 17c68e53c2
Signed by: deblan
GPG key ID: 03383D15A1D31745

View file

@ -83,8 +83,9 @@
{% endblock %}
{% block murph_collection_widget %}
{% set attrs = attr|merge({class: 'mb-1 ' ~ (attr.class ?? '')}) %}
<div data-collection="collection-{{ collection_name }}" {% for attr, value in row_attr %}{{ attr }}="{{ value }}"{% endfor %}>
{% set attrs = attr|merge({class: 'mb-1 ' ~ (attr.class ?? '')}) %}
{% for item in form %}
<div data-collection-item="{{ loop.index }}" {% for attr, value in attrs %}{{ attr }}="{{ value }}"{% endfor %}>
{% for child in item %}
@ -109,7 +110,7 @@
</div>
<template type="text/template" id="collection-{{ collection_name }}">
<div data-collection-item="__name__">
<div data-collection-item="__name__" {% for attr, value in attrs %}{{ attr }}="{{ value }}"{% endfor %}>
{{ form_rest(form.vars.prototype) }}
<div class="text-right">