{% extends "base.html" %}
{% load static %}
{% block content %}
<p><a class="btn btn-default" href="{% url 'notifications:subscription_list' %}">Subscription Listing</a></p>

<div class="row">
  <div class="col s12">
    <p>You are currently subscribed to receive {% if subscription_type == "SMS" %}text message{% else %}email{% endif %} notifications about pickup times for {{object.district}}.</p>

    <p>
      <form method="post" action="{% url 'notifications:subscription_update' object.id %}">
        {% csrf_token %}
        {% if object.suspended %}
        <input type="hidden" name="suspended" value="False" />
        <input type="submit" value="Enable subscription" />
        {% else %}
        <input type="hidden" name="suspended" value="True" />
        <input type="submit" value="Disable subscription" />
        {% endif %}

        <input type="hidden" name="id" value="{{object.id}}" />
      </form>
    </p>
      
    <p><a class="btn btn-primary" href="{{object.get_update_url}}">Edit Subscription</a></p>
  </div>
</div>

{% endblock %}
