{% block collection_widget %} {% apply spaceless %} {# # This is almost a copy/paste of jquery.collection.html.twig, we can't use it as it also # use form_widget. Note that we also use form_widget(prototype) instead of form_row(prototype) # to avoid generating extra markup. #} {% if prototype is defined %} {% set attr = attr|merge({'data-prototype': form_widget(prototype)}) %} {% set attr = attr|merge({'data-prototype-name': prototype.vars.name}) %} {% endif %} {% set attr = attr|merge({'data-allow-add': allow_add ? 1 : 0}) %} {% set attr = attr|merge({'data-allow-remove': allow_delete ? 1 : 0 }) %} {% set attr = attr|merge({'data-name-prefix': full_name}) %}
{% endapply %} {% endblock %} {% block ActionType_widget %} {# widget_attributes will generate class="item" from the DiscountCollectionType.entry_options configuration #}