
{% load i18n %}

<div data-role="images-container" class="files-container">

    <div data-role="drop-files-section" class="dropzone drop-section">
        <div class="dz-default dz-message">{% trans 'Press or Drag files here' %}</div>
    </div>

    {% if form.is_remote_upload_enabled %}
    	<div class="drop-section" data-role="drop-link-section">
            <div style="margin-top: 30px">
                {% trans 'Drag images here' %}
            </div>
        </div>
    {% endif %}

    <div class="files" data-role="files"></div>

</div>

<script>
    Dropzone.autoDiscover = false;

    (function ($) {
        $(document).ready(function () {
            new FileManager({
                $input: $('#{{ field_id }}'),
                uploadUrl: '{% url "attachments:upload" %}',
                removeMessage: '{% trans "Do you really want to delete image ?" %}'
            });
        });
    })(django.jQuery);
</script>
