{% block artgris_media_widget %} {% apply spaceless %} {% with {'form': form, 'collection': false, 'id': form.vars.id, 'conf': conf, 'extra': extra } only %} {{ block('render_media') }} {% endwith %} {% 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 %} {% apply spaceless %} {% if prototype is defined %} {% set data_prototype %} {% with {'form': prototype, 'collection': true, 'id': form.vars.id, 'conf': conf, 'extra': extra } only %} {{ block('render_media') }} {% endwith %} {% endset %} {% set attr = attr|merge({'data-prototype': data_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-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}) %}