Add a common base email template, translate the emails over to using jinja and add emails when e-mail addresses and passwords are changed.
This commit is contained in:
parent
64480fd4ed
commit
3c20402b32
12 changed files with 258 additions and 89 deletions
46
emails/base.html
Normal file
46
emails/base.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>{{ subject }}</title>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; margin: 0; padding: 0;"><style type="text/css">
|
||||
@media only screen and (max-width: 600px) {
|
||||
a[class="btn"] {
|
||||
display: block !important; margin-bottom: 10px !important; background-image: none !important; margin-right: 0 !important;
|
||||
}
|
||||
div[class="column"] {
|
||||
width: auto !important; float: none !important;
|
||||
}
|
||||
table.social div[class="column"] {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- HEADER -->
|
||||
<table class="head-wrap" bgcolor="#FFFFFF" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"></td>
|
||||
<td class="header container" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto; padding: 0;">
|
||||
|
||||
<div class="content" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; max-width: 600px; display: block; margin: 0 auto; padding: 15px;">
|
||||
<table bgcolor="#FFFFFF" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><img src="{{ app_logo }}" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; max-width: 100%; margin: 0; padding: 0;" /></td>
|
||||
<td align="right" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><h6 class="collapse" style="font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; line-height: 1.1; color: #444; font-weight: 900; font-size: 14px; text-transform: uppercase; margin: 0; padding: 0;">{{ app_title }}</h6></td>
|
||||
</tr></table></div>
|
||||
|
||||
</td>
|
||||
<td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"></td>
|
||||
</tr></table><!-- /HEADER --><!-- BODY --><table class="body-wrap" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"></td>
|
||||
<td class="container" bgcolor="#FFFFFF" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto; padding: 0;">
|
||||
|
||||
<div class="content" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; max-width: 600px; display: block; margin: 0 auto; padding: 15px;">
|
||||
<table style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; width: 100%; margin: 0; padding: 0;"><tr style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"><td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;">
|
||||
{% block content %}{% endblock %}
|
||||
</td>
|
||||
</tr></table></div><!-- /content -->
|
||||
|
||||
</td>
|
||||
<td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; margin: 0; padding: 0;"></td>
|
||||
</tr></table><!-- /BODY -->
|
||||
</body>
|
||||
</html>
|
13
emails/changeemail.html
Normal file
13
emails/changeemail.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>E-mail Address Change Requested</h3>
|
||||
|
||||
This email address was recently asked to become the new e-mail address for user {{ username | user_reference }}.
|
||||
<br>
|
||||
<br>
|
||||
To confirm this email address, please click the following link:<br>
|
||||
{{ app_link('confirm?code=' + token) }}
|
||||
|
||||
{% endblock %}
|
13
emails/confirmemail.html
Normal file
13
emails/confirmemail.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Please Confirm E-mail Address</h3>
|
||||
|
||||
This email address was recently used to register user {{ username | user_reference }}.
|
||||
<br>
|
||||
<br>
|
||||
To confirm this email address, please click the following link:<br>
|
||||
{{ app_link('confirm?code=' + token) }}
|
||||
|
||||
{% endblock %}
|
12
emails/emailchanged.html
Normal file
12
emails/emailchanged.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Account E-mail Address Changed</h3>
|
||||
|
||||
The email address for user {{ username | user_reference }} has been changed from this e-mail address to {{ new_email }}.
|
||||
<br>
|
||||
<br>
|
||||
If this change was not expected, please immediately log into your {{ username | admin_reference }} and reset your email address.
|
||||
|
||||
{% endblock %}
|
12
emails/passwordchanged.html
Normal file
12
emails/passwordchanged.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Account Password Changed</h3>
|
||||
|
||||
The password for user {{ username | user_reference }} has been updated.
|
||||
<br>
|
||||
<br>
|
||||
If this change was not expected, please immediately log into your {{ username | admin_reference }} and reset your password.
|
||||
|
||||
{% endblock %}
|
13
emails/paymentfailure.html
Normal file
13
emails/paymentfailure.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Subscription Payment Failure</h3>
|
||||
|
||||
Your recent payment for account {{ username | user_reference }} failed, which usually results in our payments processor canceling
|
||||
your subscription automatically. If you would like to continue to use {{ app_title }} without interruption,
|
||||
please add a new card to {{ app_title }} and re-subscribe to your plan.<br>
|
||||
<br>
|
||||
You can find the card and subscription management features under your {{ username | admin_reference }}<br>
|
||||
|
||||
{% endblock %}
|
18
emails/recovery.html
Normal file
18
emails/recovery.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Account recovery</h3>
|
||||
|
||||
A user at {{ app_link() }} has attempted to recover their account
|
||||
using this email address.
|
||||
<br>
|
||||
<br>
|
||||
If you made this request, please click the following link to recover your account and
|
||||
change your password:
|
||||
{{ app_link('recovery?code=' + token) }}
|
||||
<br><br>
|
||||
If you did not make this request, your account has not been compromised and the user was
|
||||
not given access. Please disregard this email.
|
||||
|
||||
{% endblock %}
|
13
emails/repoauthorizeemail.html
Normal file
13
emails/repoauthorizeemail.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>Verify e-mail to receive repository notifications</h3>
|
||||
|
||||
A request has been made to send <a href="http://docs.quay.io/guides/notifications.html">notifications</a> to this email address for repository {{ (namespace, repository) | repository_reference }}
|
||||
|
||||
<br><br>
|
||||
To verify this email address, please click the following link:<br>
|
||||
{{ app_link('authrepoemail?code=' + token) }}
|
||||
|
||||
{% endblock %}
|
Reference in a new issue