forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubscription.html
More file actions
58 lines (42 loc) · 1.94 KB
/
subscription.html
File metadata and controls
58 lines (42 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load bootstrap3 %}
{% block title %}Subscription to {{ clist.long_name }}{% endblock %}
{% block content %}
{% origin %}
<h1>Subscription to {{ clist.long_name }}</h1>
{% bootstrap_messages %}
<p>Get notified when changes happen to any of the tracked documents.</p>
{% if existing_subscriptions %}
<h2>Existing subscriptions</h2>
<ul class="list-group">
{% for s in existing_subscriptions %}
<li class="list-group-item email-subscription">
<form method="post">
{% csrf_token %}
<code>{{ s.email.address }}</code> - {{ s.get_notify_on_display }}
<input type="hidden" name="subscription_id" value="{{ s.pk }}">
<button class="btn btn-danger btn-sm" type="submit" name="action" value="unsubscribe">Unsubscribe</button>
</form>
</li>
{% endfor %}
</ul>
<p><a class="btn btn-default" href="{{ clist.get_absolute_url }}">Back to list</a></p>
{% endif %}
<h2>Add new subscription</h2>
<p class="text-muted">The email addresses you can choose between are those registered in <a href="{% url "ietf.ietfauth.views.profile" %}">your profile</a>.</p>
{% if form.fields.email.queryset %}
<form method="post">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<a class="btn btn-default" href="{{ clist.get_absolute_url }}">Back to list</a>
<button type="submit" name="action" value="subscribe" class="btn btn-primary">Subscribe</button>
{% endbuttons %}
</form>
{% else %}
<div class="alert alert-danger">You do not have any active email addresses registered with your account. Go to <a href="{% url "ietf.ietfauth.views.profile" %}">your profile and add or activate one</a>.</div>
<a class="btn btn-default" href="{{ clist.get_absolute_url }}">Back to list</a>
{% endif %}
{% endblock %}