templates_nopaste_modulesdir = $(templates_nopastedir)/modules
templates_people_DATA = \
- src/templates/people/index.html \
- src/templates/people/subscribed.html \
- src/templates/people/unsubscribe.html \
- src/templates/people/unsubscribed.html
+ src/templates/people/index.html
templates_peopledir = $(templatesdir)/people
src/templates/users/edit.html \
src/templates/users/index.html \
src/templates/users/passwd.html \
- src/templates/users/show.html
+ src/templates/users/show.html \
+ src/templates/users/subscribe.html \
+ src/templates/users/subscribed.html \
+ src/templates/users/unsubscribe.html \
+ src/templates/users/unsubscribed.html
templates_usersdir = $(templatesdir)/users
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Thank You") }}{% end block %}
-
-{% block content %}
- <div class="row justify-content-center my-5">
- <div class="col-12 col-md-6">
- <div class="card bg-success text-white p-md-5 mb-3">
- <div class="card-body text-center">
- <span class="fas fa-check fa-5x my-4"></span>
-
- <p class="lead">
- {{ _("You have been subscribed and will now receive updates from the IPFire Project.") }}
- </p>
- </div>
- </div>
-
- <div class="d-grid">
- <a class="btn btn-light" href="/">
- {{ _("Back") }}
- </a>
- </div>
- </div>
- </div>
-{% end block %}
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Thank You") }}{% end block %}
-
-{% block content %}
- <div class="row justify-content-center my-5">
- <div class="col-12 col-md-6">
- <div class="card bg-danger text-white p-md-5 mb-3">
- <div class="card-body text-center">
- <span class="fas fa-check fa-5x my-4"></span>
-
- <p class="lead">
- {{ _("You have been unsubscribed and will no longer receive important updates from the IPFire Project.") }}
- </p>
- </div>
- </div>
-
- <form action="/subscribe" method="POST">
- {% raw xsrf_form_html() %}
-
- <div class="d-grid">
- <button type="submit" class="btn btn-success">
- {{ _("Continue Receiving Important Updates") }}
- </button>
- </div>
- </form>
- </div>
- </div>
-{% end block %}
--- /dev/null
+{% extends "../base.html" %}
+
+{% block title %}{{ _("Subscribe") }}{% end block %}
+
+{% block container %}
+ <div class="columns is-centered">
+ <div class="column is-one-third-desktop">
+ <div class="notification my-auto">
+ <h5 class="title is-5">{{ _("Subscribe Now To Stay Up To Date") }}</h5>
+
+ <div class="content">
+ <p>
+ {{ _("Subscribe and you will receive important emails from the IPFire Project:") }}
+ </p>
+
+ <ul>
+ <li>{{ _("Important release announcements including notificiations about security updates") }}</li>
+ <li>{{ _("News from our blog and inside the project") }}</li>
+ <li>{{ _("Information about our fundraising efforts") }}</li>
+ </ul>
+ </div>
+
+ <div class="block">
+ <form method="POST" action="/subscribe">
+ {% raw xsrf_form_html() %}
+
+ <button type="submit" class="button is-success is-large is-fullwidth">
+ {{ _("Subscribe") }}
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+{% end block %}
--- /dev/null
+{% extends "../base.html" %}
+
+{% block title %}{{ _("Thank You") }}{% end block %}
+
+{% block container %}
+ <div class="columns is-centered">
+ <div class="column is-one-third-desktop">
+ <div class="notification is-success my-auto has-text-centered">
+ <div class="block">
+ <span class="fa-solid fa-check fa-5x my-4"></span>
+ </div>
+
+ <p>
+ {{ _("You have been subscribed and will now receive updates from the IPFire Project") }}
+ </p>
+ </div>
+ </div>
+ </div>
+{% end block %}
{% block title %}{{ _("Unsubscribe") }}{% 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-danger">
- <div class="card-body">
- <h5>{{ _("We'd Be Sorry To See You Go") }}</h5>
+{% block container %}
+ <div class="columns is-centered">
+ <div class="column is-one-third-desktop">
+ <div class="notification my-auto">
+ <h5 class="title is-5">{{ _("We'd Be Sorry To See You Go") }}</h5>
+ <div class="content">
<p>
{{ _("If you unsubscribe, you will no longer receive important emails from the IPFire Project.") }}
{{ _("There are plenty of benefits to remain subscribed:") }}
<li>{{ _("News from our blog and inside the project") }}</li>
<li>{{ _("Information about our fundraising efforts") }}</li>
</ul>
+ </div>
- <form action="/subscribe" method="POST">
+ <div class="block">
+ <form method="POST" action="/subscribe">
{% raw xsrf_form_html() %}
- <div class="d-grid">
- <button type="submit" class="btn btn-success mb-3">
- {{ _("Continue Receiving Important Updates") }}
- </button>
- </div>
+ <button type="submit" class="button is-success is-large is-fullwidth">
+ {{ _("Continue Receiving Important Updates") }}
+ </button>
</form>
+ </div>
- <form action="/unsubscribe" method="POST">
+ <div class="block">
+ <form method="POST" action="/unsubscribe">
{% raw xsrf_form_html() %}
- <div class="d-grid">
- <button type="submit" class="btn btn-danger">
- {{ _("Unsubscribe") }}
- </button>
- </div>
+ <button type="submit" class="button is-danger is-fullwidth">
+ {{ _("Unsubscribe") }}
+ </button>
</form>
</div>
</div>
--- /dev/null
+{% extends "../base.html" %}
+
+{% block title %}{{ _("Thank You") }}{% end block %}
+
+{% block container %}
+ <div class="columns is-centered">
+ <div class="column is-one-third-desktop my-auto">
+ <div class="block">
+ <div class="notification is-danger has-text-centered">
+ <div class="block">
+ <span class="fa-solid fa-check fa-5x my-4"></span>
+ </div>
+
+ <p>
+ {{ _("You have been unsubscribed and will no longer receive important updates from the IPFire Project") }}
+ </p>
+ </div>
+ </div>
+
+ <div class="block">
+ <form action="/subscribe" method="POST">
+ {% raw xsrf_form_html() %}
+
+ <button type="submit" class="button is-success is-fullwidth">
+ {{ _("Continue Receiving Important Updates") }}
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+{% end block %}
(r"/users/([a-z_][a-z0-9_-]{0,31})/edit", users.EditHandler),
(r"/users/([a-z_][a-z0-9_-]{0,31})/passwd", users.PasswdHandler),
+ # Promotional Consent Stuff
+ (r"/subscribe", users.SubscribeHandler),
+ (r"/unsubscribe", users.UnsubscribeHandler),
+
# VoIP
(r"/voip", voip.IndexHandler),
(r"/activate/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.ActivateHandler),
(r"/register", auth.RegisterHandler),
- # Promotional Consent Stuff
- (r"/subscribe", people.SubscribeHandler),
- (r"/unsubscribe", people.UnsubscribeHandler),
-
# Serve any static files
(r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }),
] + authentication_handlers)
@tornado.web.authenticated
def get(self):
self.render("people/index.html")
-
-
-class SubscribeHandler(base.BaseHandler):
- @tornado.web.authenticated
- def post(self):
- # Give consent
- self.current_user.consents_to_promotional_emails = True
-
- self.render("people/subscribed.html")
-
-
-class UnsubscribeHandler(base.BaseHandler):
- @tornado.web.authenticated
- def get(self):
- if self.current_user.consents_to_promotional_emails:
- return self.render("people/unsubscribe.html")
-
- self.render("people/unsubscribed.html")
-
- @tornado.web.authenticated
- def post(self):
- # Withdraw consent
- self.current_user.consents_to_promotional_emails = False
-
- self.render("people/unsubscribed.html")
self.render("users/groups/show.html", group=group)
+class SubscribeHandler(base.BaseHandler):
+ @tornado.web.authenticated
+ def get(self):
+ self.render("users/subscribe.html")
+
+ @tornado.web.authenticated
+ def post(self):
+ # Give consent
+ with self.db.transaction():
+ self.current_user.consents_to_promotional_emails = True
+
+ self.render("users/subscribed.html")
+
+
+class UnsubscribeHandler(base.BaseHandler):
+ @tornado.web.authenticated
+ def get(self):
+ if self.current_user.consents_to_promotional_emails:
+ return self.render("users/unsubscribe.html")
+
+ self.render("users/unsubscribed.html")
+
+ @tornado.web.authenticated
+ def post(self):
+ # Withdraw consent
+ with self.db.transaction():
+ self.current_user.consents_to_promotional_emails = False
+
+ self.render("users/unsubscribed.html")
+
+
class ListModule(ui_modules.UIModule):
def render(self, accounts, show_created_at=False):
return self.render_string("users/modules/list.html", accounts=accounts,