{% extends "base.html" %}

{% comment %}This view is used to confirme the deletion of a ``mtp.apps.surveys.Pool`` instance.

Context
-------
user : instance of ``mtp.apps.accounts.MTPUser``
    The user is expected to be a superuser or a trainer.
pool : instance of ``mtp.apps.surveys.models.Pool``
    The pool to delete.

Todo
----
Clicking on or ``cancel`` should return on the page the user came from.

{% endcomment %}

{% load i18n %}

{% block body_class %}{{ block.super }} page-cms-surveys page-cms-surveys-pools{% endblock %}

{% block subtitle %}
    {% trans 'Deletion confirmation' %}
{% endblock %}

{% block actions %}
    <a class="btn btn-default" href="{{ pool.get_absolute_url }}">{% trans 'Back to the pool' %}</a>
{% endblock %}

{% block main %}
    <form action="{{ pool.get_delete_url }}" method="post" class="well">{% csrf_token %}
        <p>
            {% blocktrans trimmed with pool_name=pool.name %}
                Are you sure you want to delete the pool of question "{{ pool_name }}"?
            {% endblocktrans %}
        </p>
        <input class="btn btn-danger" type="submit" value="{% trans 'Confirm' %}" />
        <a class="btn btn-link" href="{{ view.model.get_list_url }}">{%  trans 'Cancel' %}</a>
    </form>
{% endblock %}
