{% extends "core/file.jinja" %}

{% block title %}
  {% trans %}Delete confirmation{% endtrans %}
{% endblock %}

{% if is_fragment %}

  {# Don't display tabs and errors #}
  {% block tabs %}
  {% endblock %}
  {% block errors %}
  {% endblock %}

{% endif %}

{% block file %}
  <h2>{% trans %}Delete confirmation{% endtrans %}</h2>

  {% if next %}
    {% set action = current + "?next=" + next %}
  {% else %}
    {% set action = current %}
  {% endif %}

  <form action="{{ action }}" method="post">
    {% csrf_token %}

    <p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
    <button
      {% if is_fragment %}
        hx-post="{{ action }}"
        hx-target="#content"
        hx-swap="outerHtml"
      {% endif %}
    >{% trans %}Confirm{% endtrans %}</button>

    <button
      {% if is_fragment %}
        hx-get="{{ previous }}"
        hx-target="#content"
        hx-swap="outerHtml"
      {% else %}
        action="window.history.back()"
      {% endif %}
    >{% trans %}Cancel{% endtrans %}</button>

  </form>

{% endblock %}




