{% extends 'account_layout.html' %}
{% load i18n %}
{% load static %}

{% block pagetitle %}{% trans 'Cancel Subscription' %}{% endblock %}
{% block account_content %}

<div class="payments-cancel-page">
    {% if subscription %}
        <form action="{% url 'payments:cancel_subscr' subscription.id %}" method="post" class="pure-form centered-form" id="cancel-form">
            {% csrf_token %}
            <fieldset>
                <p>
                    {% trans "Would you like to tell us why, or leave any feedback so we can improve our service? It's optional." %}
                </p>
                <textarea name="feedback" class="pure-input-1" maxlength=10000></textarea>

                <hr />

                <div class="pure-controls">
                    <input type="submit" class="pure-button pure-button-primary button-danger"
                            value="{% trans 'Cancel Subscription' %}" />
                </div>
            </fieldset>
        </form>
    {% else %}
        <p>You do not have any active subscription to cancel.</p>
    {% endif %}
</div>
{% endblock %}
