src/templates/people/search.html \
src/templates/people/sip.html \
src/templates/people/stats.html \
- src/templates/people/subscribe.html \
src/templates/people/subscribed.html \
src/templates/people/unsubscribe.html \
src/templates/people/unsubscribed.html \
</div>
<div class="col-12 col-lg-4">
- <a class="btn btn-success btn-block" href="/subscribe">
- {{ _("Subscribe Now") }}
- </a>
+ <form action="/subscribe" method="POST">
+ {% raw xsrf_form_html() %}
+
+ <button type="submit" class="btn btn-success btn-block">
+ {{ _("Subscribe Now") }}
+ </button>
+ </form>
</div>
</div>
</div>
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Subscribe") }}{% end block %}
-
-{% block content %}
- <div class="row justify-content-center my-5">
- <div class="col col-md-8 col-lg-6">
- <div class="card border-success">
- <div class="card-body">
- <h5>{{ _("Subscribe to Receive Import Updates from the IPFire Project") }}</h5>
-
- <p>
- {{ _("Subscribe to receive updates after releases and other important news from the IPFire Project.") }}
- </p>
-
- <form action="" method="POST">
- {% raw xsrf_form_html() %}
-
- <button type="submit" class="btn btn-success btn-block">
- {{ _("Subscribe") }}
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
-{% end block %}
class SubscribeHandler(auth.CacheMixin, base.BaseHandler):
- @tornado.web.authenticated
- def get(self):
- if self.current_user.consents_to_promotional_emails:
- return self.render("people/subscribed.html")
-
- self.render("people/subscribe.html")
-
@tornado.web.authenticated
def post(self):
# Give consent