From 2b92fded685ff69704ff567b58a1987275bebdbb Mon Sep 17 00:00:00 2001 From: Ben Spoon Date: Mon, 8 Aug 2016 13:29:47 -0700 Subject: [PATCH] emails: address review feedback --- emails/changeemail.html | 4 ++-- tools/email-viewer/emails.py | 2 +- util/useremails.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/emails/changeemail.html b/emails/changeemail.html index 663b2f8ef..ee239f3fb 100644 --- a/emails/changeemail.html +++ b/emails/changeemail.html @@ -4,7 +4,7 @@

E-mail Address Change Requested


-This email address was added to the {{ app_title }} account {{username}}. +This email address was added to the {{ app_title }} account {{ username }}. @@ -13,7 +13,7 @@
- +
If you did not add this address to {{username}}, you can safely ignore this message.If you did not add this address to {{ username }}, you can safely ignore this message.
Best Regards, diff --git a/tools/email-viewer/emails.py b/tools/email-viewer/emails.py index 609548761..bc78b3df4 100644 --- a/tools/email-viewer/emails.py +++ b/tools/email-viewer/emails.py @@ -39,7 +39,7 @@ def render_with_options(template=None): app_logo="https://quay.io/static/img/quay-horizontal-color.svg", token="sdf8SdfKGRME9dse_dfdf", app_link=app_link_handler, namespace="booboo", repository="foobar", organization="buynlarge", admin_usernames=["lazercat", "booboocoreos"], teamname="creators", inviter="devtable", - hosted = "Quay" in app_title, app_title = app_title, app_url="https://quay.io") + hosted = False, app_title = app_title, app_url="https://quay.io") def get_templates(): """ Return a list of the available templates """ diff --git a/util/useremails.py b/util/useremails.py index 44efa9568..26235b1ee 100644 --- a/util/useremails.py +++ b/util/useremails.py @@ -1,6 +1,7 @@ import logging import traceback import json +import features from flask.ext.mail import Message @@ -54,14 +55,14 @@ def send_email(recipient, subject, template_file, parameters, action=None): app_url = get_app_url() def app_link_handler(url=None): - return real_url = app_url + '/' + url if url else app_url + return app_url + '/' + url if url else app_url parameters.update({ 'subject': subject, 'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config 'app_url': app_url, 'app_title': app_title, - 'hosted': 'Quay' in app_title, + 'hosted': features.BILLING, 'app_link': app_link_handler, 'action_metadata': json.dumps(action.metadata) if action else None })