emails: address review feedback
This commit is contained in:
parent
c07a87a2b4
commit
2b92fded68
3 changed files with 6 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<h3 style="font-size: 20px; font-weight:400">E-mail Address Change Requested</h3>
|
<h3 style="font-size: 20px; font-weight:400">E-mail Address Change Requested</h3>
|
||||||
<hr style="border:none; border-top: 1px solid #D9D9D9; margin: 25px 0">
|
<hr style="border:none; border-top: 1px solid #D9D9D9; margin: 25px 0">
|
||||||
<span style="font-size: 13px; margin: 25px 0;">This email address was added to the {{ app_title }} account <strong>{{username}}</strong>.
|
<span style="font-size: 13px; margin: 25px 0;">This email address was added to the {{ app_title }} account <strong>{{ username }}</strong>.
|
||||||
|
|
||||||
<table style="margin: 25px 0;">
|
<table style="margin: 25px 0;">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</table>
|
</table>
|
||||||
<table style="margin-bottom: 25px">
|
<table style="margin-bottom: 25px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>If you did not add this address to <strong>{{username}}</strong>, you can safely ignore this message.</td>
|
<td>If you did not add this address to <strong>{{ username }}</strong>, you can safely ignore this message.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
Best Regards,
|
Best Regards,
|
||||||
|
|
|
@ -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_logo="https://quay.io/static/img/quay-horizontal-color.svg", token="sdf8SdfKGRME9dse_dfdf",
|
||||||
app_link=app_link_handler, namespace="booboo", repository="foobar", organization="buynlarge",
|
app_link=app_link_handler, namespace="booboo", repository="foobar", organization="buynlarge",
|
||||||
admin_usernames=["lazercat", "booboocoreos"], teamname="creators", inviter="devtable",
|
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():
|
def get_templates():
|
||||||
""" Return a list of the available templates """
|
""" Return a list of the available templates """
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
import json
|
import json
|
||||||
|
import features
|
||||||
|
|
||||||
from flask.ext.mail import Message
|
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()
|
app_url = get_app_url()
|
||||||
|
|
||||||
def app_link_handler(url=None):
|
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({
|
parameters.update({
|
||||||
'subject': subject,
|
'subject': subject,
|
||||||
'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config
|
'app_logo': 'https://quay.io/static/img/quay-logo.png', # TODO: make this pull from config
|
||||||
'app_url': app_url,
|
'app_url': app_url,
|
||||||
'app_title': app_title,
|
'app_title': app_title,
|
||||||
'hosted': 'Quay' in app_title,
|
'hosted': features.BILLING,
|
||||||
'app_link': app_link_handler,
|
'app_link': app_link_handler,
|
||||||
'action_metadata': json.dumps(action.metadata) if action else None
|
'action_metadata': json.dumps(action.metadata) if action else None
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue