{% extends "base.html" %}

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

Context
-------
pool : instance of ``mtp.apps.surveys.models.Pool``
    The pool for which we display the questions.
question : instance of ``mtp.apps.surveys.models.Question``
    The question 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-questions{% endblock %}

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

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

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