{% extends "base/base.html" %}
{% import "widgets/poll.html" as poll_widget with context %}

{% block title %}
<h1>Supprimer un sondage</h1>
{% endblock %}

{% block content %}
<section>
    {{ poll_widget.wpoll(poll) }}

    <form action="{{ url_for('poll_delete', poll_id=poll.id) }}" method=post>
        {{ del_form.hidden_tag() }}
        <div>
            {{ del_form.delete.label }}
            {{ del_form.delete(checked=False) }}
            <div style="font-size: 80%; color: gray">{{ del_form.delete.description }}</div>
            {% for error in del_form.delete.errors %}
            <span class=msgerror>{{ error }}</span>
            {% endfor %}
        </div>
        <div>{{ del_form.submit(class_="bg-error") }}</div>
    </form>
</section>
{% endblock %}
