{% extends '@SyliusUi/Form/theme.html.twig' %} {% block collection_widget -%} {% from '@SyliusResource/Macros/notification.html.twig' import error %} {% import _self as self %} {% set attr = attr|merge({'class': attr.class|default ~ ' controls collection-widget'}) %} {% apply spaceless %}
{{ error(form.vars.errors) }} {% if prototypes|default is iterable %} {% for key, subPrototype in prototypes %} {% endfor %} {% endif %}
{% for child in form %} {{ self.collection_item(child, allow_delete, button_delete_label, loop.index0) }} {% endfor %}
{% if prototype is defined and allow_add %} {{ button_add_label|trans }} {% endif %}
{% endapply %} {%- endblock collection_widget %} {% macro collection_item(form, allow_delete, button_delete_label, index) %} {% apply spaceless %}
{{ form_widget(form) }}
{% if allow_delete %} {{ button_delete_label|trans }} {% endif %}
{% endapply %} {% endmacro %} {% block sylius_product_image_widget %} {% apply spaceless %} {{ form_row(form.type) }} {% if form.vars.value.path|default(null) is not null %} {{ form.vars.value.type }} {% endif %}
{{- form_errors(form.file) -}}
{% if product.id is not null and 0 != product.variants|length and not product.simple %} {{ form_row(form.productVariants) }} {% endif %} {% endapply %} {% endblock %} {% block sylius_taxon_image_widget %} {% apply spaceless %} {{ form_row(form.type) }} {% if form.vars.value.path|default(null) is null %} {% else %} {{ form.vars.value.type }} {% endif %}
{{- form_errors(form.file) -}}
{% endapply %} {% endblock %} {% block sylius_avatar_image_widget %} {% apply spaceless %} {% if form.vars.value.path|default(null) is not null %} {{ form.vars.value.type }} {% endif %}
{{- form_errors(form.file) -}}
{% endapply %} {% endblock %}