{% extends base_template_name %}
{% block content %}
<div class="unsubscribe-container">
    {% if action == 'unsubscribe' %}
        <h3>{{ unsubscribe_message }}</h3>
        <p>{{ user_email }} has been unsubscribed from our email list.</p>
        <p>Return to <a href="/">home</a>.</p>
    {% elif action == 'resubscribe' %}
        <h3>{{ resubscribe_message }}</h3>
        <p>{{ user_email }} has been re-subscribed to our email list.</p>
        <p>Return to <a href="/">home</a>.</p>
    {% else %}
        <h3>{{ confirmation_message }}</h3>
        <p>Manage subscription for {{ user_email }}</p>
        <form method="post" action="">
            <button type="submit" name="action" value="unsubscribe">Unsubscribe</button>
            <button type="submit" name="action" value="resubscribe">Re-subscribe</button>
        </form>
    {% endif %}
</div>
{% endblock %}