{% extends 'main/base.html' %}

{% load i18n %}
{% load static %}

{% block title %} :: {% if delete_view %}{% trans 'Confirm delete' %}{% else %}{% trans 'Confirm' %}{% endif %}{% endblock %}

{% block sidebar %}
    {% for subtemplate in subtemplates %}
        {% include subtemplate %}
    {% endfor %}
{% endblock %}

{% block content %}
    <div id="box">
      <div class="block" id="block-login">
        {% if delete_view %}
            <h2>{% trans 'Confirm delete' %}</h2>
        {% else %}
            <h2>{% trans 'Confirm' %}</h2>
        {% endif %}
        <div class="content login">
          <form action="" method="post" class="form login">{% csrf_token %}
            {% if next %}
                <input name="next" type="hidden" value="{{ next }}" />
            {% endif %}

            {% if title %}
                <h3>{{ title }}</h3>
            {% else %}
                {% if delete_view %}
                    {% if object_name %}
                        <h3>{% blocktrans %}Are you sure you wish to delete {{ object_name }}: {{ object }}?{% endblocktrans %}</h3>
                    {% else %}
                        <h3>{% blocktrans %}Are you sure you wish to delete: {{ object }}?{% endblocktrans %}</h3>
                    {% endif %}
                {% else %}
                    <h4>{% trans 'Are you sure you wish to proceed?' %}</h4>
                {% endif %}
            {% endif %}
            {% if message %}<h4>{{ message }}</h4>{% endif %}

            <div class="group navform wat-cf">
                <button class="button" type="submit">
                    <img src="{% static 'web_theme_media/images/icons/tick.png' %}" alt="{% trans 'Yes' %}" /> {% trans 'Yes' %}
                </button>
                <a href="#" onclick='{% if previous %}window.location.replace("{{ previous }}");{% else %}history.go(-2);{% endif %}' class="button">
                    <img src="{% static 'web_theme_media/images/icons/cross.png' %}"  alt="{% trans 'No' %}"/> {% trans 'No' %}
                </a>
            </div>
          </form>
        </div>
      </div>
    </div>
{% endblock %}
