{% extends "admin/change_form.html" %}
{% load i18n admin_urls admin_modify %}
{% block extrahead %}
    {{ block.super }}
    <script src="{% url 'admin:jsi18n' %}"></script>
    <style>
    .btn-delete {
      margin-left: auto;
    }
    .btn-upload {
      display: none !important;
    }
    </style>
{% endblock %}
{% block submit_buttons_bottom %}
    <div class="submit-row">
        {% if change and has_change_permission or has_add_permission and add or has_editable_inline_admin_formsets %}
            <button type="submit"
                    class="btn btn-primary"
                    name="{% block submit_button %}_save{% endblock %}"
                    value="{% translate 'Save' %}">{% translate 'Save' %}</button>
        {% endif %}
        {% if change and has_delete_permission %}
            <button type="submit"
                    class="btn btn-danger btn-delete"
                    name="_delete"
                    value="{% translate 'Delete' %}">{% translate 'Delete' %}</button>
        {% endif %}
    </div>
    <script>
    $(document).ready(function () {
      new ChunkUploaded("{% url 'django_chunk_file_upload:uploads' %}").init();
    });
    </script>
{% endblock %}
