{% extends "campaign/base.html" %}
{% load i18n %}
{% block content %}
{# {% if form.errors %}#}
{# {% for field in form %}#}
{# {% for error in field.errors %}#}
{# <div class="alert alert-error">#}
{# <strong>{{ error|escape }}</strong>#}
{# </div>#}
{# {% endfor %}#}
{# {% endfor %}#}
{# {% for error in form.non_field_errors %}#}
{# <div class="alert alert-error">#}
{# <strong>{{ error|escape }}</strong>#}
{# </div>#}
{# {% endfor %}#}
{#{% endif %}#}
{% ifequal action "unsubscribe" %}
{% if success %}
<h2>{% trans "You successfully unscuscribed from the following Newsletter Lists:" %}</h2>
{% for list in lists %}
- {{ list }}<br>
{% endfor %}
{% else %}
<p>{% trans "Something went wrong and we could not unsubscribe you." %} </p>
{% endif %}
{% else %}
<h2>{% trans "Are you sure to unsubscribe from our newsletter?" %}</h2>
{% if form.list %}
<p>Please select any List you want to unsubscribe from:</p>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p }}
<div class="center">
<input class="button button-splash button-small" type="submit" value="{% trans "Unsubscribe me from selected Lists" %}"/>
</div>
</form>
{% else %}
<p>You are not subscribed to any list, no action needed.</p>
{% endif %}
{% endifequal %}
{% endblock %}