{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=media.title %}Delete {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
    {% trans "Delete media file" as del_str %}
    {% include "wagtailadmin/shared/header.html" with title=del_str subtitle=media.title icon="media" %}

    <div class="nice-padding">
        <div class="usagecount">
            <a href="{{ media.usage_url }}">{% blocktrans count usage_count=media.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
        </div>

        <p>{% trans "Are you sure you want to delete this media file?" %}</p>
        <form action="{% url 'wagtailmedia:delete' media.pk %}" method="POST" novalidate>
            {% csrf_token %}
            {% if next %}<input type="hidden" value="{{ next }}" name="next">{% endif %}
            <button type="submit" class="button serious">{% trans "Yes, delete" %}</button>
            <a href="{% url 'wagtailmedia:index' %}" class="button button-secondary">{% trans "No, don't delete" %}</a>
        </form>
    </div>
{% endblock %}
