{% extends "base.html" %}
{% load i18n %}

{% block subtitle %}
    {% trans 'Brainstormer Proposition Group deletion' %}
{% endblock subtitle %}

{% block main %}
    <div class="row-fluid">
        {% if object.propositions.count == 0 %}
            <form class="well" action="" method="post">{% csrf_token %}
                <p>{% blocktrans with group_name=object.name brainstormer_name=object.brainstormer.name %}Are you sure you want to delete the group "{{ group_name }}" in brainstormer "{{ brainstormer_name }}"?{% endblocktrans %}</p>
                <input class="btn btn-danger" type="submit" value="{% trans 'Confirm' %}" />
                <a class="btn btn-link" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
            </form>
        {% else %}
            <form action="" method="post">{% csrf_token %}
                <p>{% blocktrans with group_name=object.name brainstormer_name=object.brainstormer.name %}Are you sure you want to delete the group "{{ group_name }}" in brainstormer "{{ brainstormer_name }}"?{% endblocktrans %}</p>
                <ul>
                {% for proposition in object.propositions.all %}
                    <li>{% trans "Proposition" %}: {{ proposition.text }}</li>
                {% endfor %}
                </ul>
                <input class="btn btn-danger" name="deleteAll" type="submit" value="{% trans 'Confirm and delete all propositions' %}" />
                <input class="btn btn-warning" name="deleteKeep" type="submit" value="{% trans 'Confirm but keep propositions' %}" />
                <a class="btn btn-default" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
            </form>
        {% endif %}
    </div>
{% endblock main %}
