{% block artgris_media_widget %} {% import _self as artgris %} {% apply spaceless %} {{ artgris.render_media(form, false, form.vars.id, conf) }} {% endapply %} {% include '@ArtgrisMedia/form/_modal.html.twig' %} {% include '@ArtgrisMedia/form/_crop_modal.html.twig' with {crop_options: form.vars.crop_options} %} {% endblock %} {% block artgris_media_collection_widget %} {% import _self as artgris %} {% apply spaceless %} {% if prototype is defined %} {% set attr = attr|merge({'data-prototype': artgris.render_media(prototype, true, form.vars.id, conf)}) %} {% 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-max': data_max ? data_max : 100}) %} {% set attr = attr|merge({'data-min': data_min ? data_min : 0}) %} {% set attr = attr|merge({'data-init-with-n-elements': data_init_with_n_elements ? data_init_with_n_elements : 1}) %} {% set attr = attr|merge({'data-add-at-the-end': data_add_at_the_end ? data_add_at_the_end : false}) %} {% set attr = attr|merge({'data-allow-remove': allow_delete ? 1 : 0 }) %} {% set attr = attr|merge({'data-name-prefix': full_name}) %}