forked from github/plane
dev: update email templates (#2948)
* dev: update magic link email * dev: forgot password mail * dev: workspace invitation update * dev: update email templates and task * dev: remove email verification template * dev: change all conversation links to issues
This commit is contained in:
parent
c95a6522ab
commit
46c7f98c9d
@ -24,7 +24,7 @@ def forgot_password(first_name, email, uidb64, token, current_site):
|
||||
relative_link = (
|
||||
f"/accounts/password/?uidb64={uidb64}&token={token}&email={email}"
|
||||
)
|
||||
abs_url = current_site + relative_link
|
||||
abs_url = str(current_site) + relative_link
|
||||
|
||||
instance_configuration = InstanceConfiguration.objects.filter(
|
||||
key__startswith="EMAIL_"
|
||||
|
@ -21,11 +21,6 @@ from plane.license.utils.instance_value import get_email_configuration
|
||||
@shared_task
|
||||
def magic_link(email, key, token, current_site):
|
||||
try:
|
||||
if current_site:
|
||||
realtivelink = f"/magic-sign-in/?password={token}&key={key}"
|
||||
abs_url = current_site + realtivelink
|
||||
else:
|
||||
abs_url = ""
|
||||
|
||||
instance_configuration = InstanceConfiguration.objects.filter(
|
||||
key__startswith="EMAIL_"
|
||||
@ -69,7 +64,7 @@ def magic_link(email, key, token, current_site):
|
||||
|
||||
# Send the mail
|
||||
subject = f"Your unique Plane login code is {token}"
|
||||
context = {"code": token}
|
||||
context = {"code": token, "email": email}
|
||||
|
||||
html_content = render_to_string("emails/auth/magic_signin.html", context)
|
||||
text_content = strip_tags(html_content)
|
||||
@ -93,6 +88,7 @@ def magic_link(email, key, token, current_site):
|
||||
msg.send()
|
||||
return
|
||||
except Exception as e:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
# Print logs if in DEBUG mode
|
||||
if settings.DEBUG:
|
||||
|
@ -35,7 +35,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor):
|
||||
relative_link = f"/workspace-invitations/?invitation_id={workspace_member_invite.id}&email={email}&slug={workspace.slug}"
|
||||
|
||||
# The complete url including the domain
|
||||
abs_url = current_site + relative_link
|
||||
abs_url = str(current_site) + relative_link
|
||||
|
||||
instance_configuration = InstanceConfiguration.objects.filter(
|
||||
key__startswith="EMAIL_"
|
||||
@ -133,6 +133,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor):
|
||||
|
||||
return
|
||||
except (Workspace.DoesNotExist, WorkspaceMemberInvite.DoesNotExist) as e:
|
||||
print("Workspace or WorkspaceMember Invite Does not exists")
|
||||
return
|
||||
except Exception as e:
|
||||
# Print logs if in DEBUG mode
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<p>
|
||||
Dear {{first_name}},<br /><br />
|
||||
Welcome! Your account has been created.
|
||||
Verify your email by clicking on the link below <br />
|
||||
{{verification_url}}
|
||||
successfully.<br /><br />
|
||||
</p>
|
||||
|
||||
</html>
|
@ -626,7 +626,8 @@
|
||||
class="r12-i nl2go-default-textstyle"
|
||||
style="
|
||||
color: #3b3f44;
|
||||
font-family: georgia, serif;
|
||||
font-family: arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
@ -717,7 +718,8 @@
|
||||
display: block;
|
||||
-webkit-text-size-adjust: none;
|
||||
color: #ffffff;
|
||||
font-family: georgia, serif;
|
||||
font-family: arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
"
|
||||
>
|
||||
@ -749,7 +751,8 @@
|
||||
class="r11-i nl2go-default-textstyle"
|
||||
style="
|
||||
color: #3b3f44;
|
||||
font-family: georgia, serif;
|
||||
font-family: arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
@ -1079,7 +1082,7 @@
|
||||
><span style="font-size: 13px"
|
||||
>, and </span
|
||||
><a
|
||||
href="https://github.com/makeplane/plane/pulls"
|
||||
href="https://github.com/makeplane/plane/issues"
|
||||
title="Plane's GitHub conversations"
|
||||
target="_blank"
|
||||
style="
|
||||
@ -1631,7 +1634,7 @@
|
||||
>
|
||||
<span style="font-size: 12px"
|
||||
>This email was sent to
|
||||
contact.EMAIL. Please delete
|
||||
{{email}}. Please delete
|
||||
if you aren't the intended
|
||||
recipient.</span
|
||||
>
|
||||
|
@ -148,34 +148,28 @@
|
||||
padding-right: 0px !important;
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
.r13-i {
|
||||
background-color: #ffffff !important;
|
||||
padding-bottom: 5px !important;
|
||||
padding-top: 5px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
.r14-i {
|
||||
background-color: #ffffff !important;
|
||||
padding-bottom: 15px !important;
|
||||
padding-top: 15px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
.r15-i {
|
||||
padding-bottom: 0px !important;
|
||||
padding-left: 15px !important;
|
||||
padding-right: 15px !important;
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
.r16-c {
|
||||
box-sizing: border-box !important;
|
||||
text-align: center !important;
|
||||
.r13-o {
|
||||
border-bottom-color: #efefef !important;
|
||||
border-bottom-width: 1px !important;
|
||||
border-left-color: #efefef !important;
|
||||
border-left-width: 1px !important;
|
||||
border-right-color: #efefef !important;
|
||||
border-right-width: 1px !important;
|
||||
border-style: solid !important;
|
||||
border-top-color: #efefef !important;
|
||||
border-top-width: 1px !important;
|
||||
margin: 0 auto 0 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.r17-i {
|
||||
padding-bottom: 5px !important;
|
||||
padding-top: 5px !important;
|
||||
.r14-i {
|
||||
background-color: #e3e6f1 !important;
|
||||
padding-bottom: 10px !important;
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
padding-top: 10px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
.r18-o {
|
||||
.r15-o {
|
||||
border-bottom-color: #efefef !important;
|
||||
border-bottom-width: 2px !important;
|
||||
border-left-color: #efefef !important;
|
||||
@ -188,34 +182,48 @@
|
||||
margin: 0 auto 0 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.r19-i {
|
||||
.r16-i {
|
||||
padding-bottom: 5px !important;
|
||||
padding-left: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
padding-top: 5px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
.r20-i {
|
||||
.r17-i {
|
||||
padding-bottom: 5px !important;
|
||||
padding-left: 15px !important;
|
||||
padding-right: 15px !important;
|
||||
padding-top: 5px !important;
|
||||
}
|
||||
.r21-c {
|
||||
.r18-c {
|
||||
box-sizing: border-box !important;
|
||||
text-align: center !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.r19-c {
|
||||
box-sizing: border-box !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.r22-i {
|
||||
.r20-i {
|
||||
font-size: 0px !important;
|
||||
padding-bottom: 10px !important;
|
||||
padding-left: 65px !important;
|
||||
padding-right: 65px !important;
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
.r23-c {
|
||||
.r21-c {
|
||||
box-sizing: border-box !important;
|
||||
width: 32px !important;
|
||||
}
|
||||
.r22-o {
|
||||
border-style: solid !important;
|
||||
margin-right: 8px !important;
|
||||
width: 32px !important;
|
||||
}
|
||||
.r23-i {
|
||||
padding-bottom: 5px !important;
|
||||
padding-top: 5px !important;
|
||||
}
|
||||
.r24-o {
|
||||
border-style: solid !important;
|
||||
margin-right: 8px !important;
|
||||
@ -646,49 +654,6 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
>
|
||||
<tr>
|
||||
<td class="r8-c" align="left">
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="50%"
|
||||
class="r9-o"
|
||||
style="
|
||||
table-layout: fixed;
|
||||
width: 50%;
|
||||
"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
align="left"
|
||||
valign="top"
|
||||
class="r13-i nl2go-default-textstyle"
|
||||
style="
|
||||
color: #3b3f44;
|
||||
font-family: georgia, serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
text-align: left;
|
||||
"
|
||||
>
|
||||
<div>
|
||||
<p style="margin: 0">
|
||||
<span style="font-size: 24px"
|
||||
>{{code}}</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="r8-c" align="left">
|
||||
<table
|
||||
@ -697,8 +662,20 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r9-o"
|
||||
class="r13-o"
|
||||
style="
|
||||
background-color: #e3e6f1;
|
||||
border-bottom-color: #efefef;
|
||||
border-bottom-width: 1px;
|
||||
border-collapse: separate;
|
||||
border-left-color: #efefef;
|
||||
border-left-width: 1px;
|
||||
border-radius: 5px;
|
||||
border-right-color: #efefef;
|
||||
border-right-width: 1px;
|
||||
border-style: solid;
|
||||
border-top-color: #efefef;
|
||||
border-top-width: 1px;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
"
|
||||
@ -712,11 +689,14 @@
|
||||
color: #3b3f44;
|
||||
font-family: georgia, serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-break: break-word;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: 15px;
|
||||
padding-top: 15px;
|
||||
background-color: #e3e6f1;
|
||||
border-radius: 4px;
|
||||
line-height: 3;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 10px;
|
||||
text-align: left;
|
||||
"
|
||||
>
|
||||
@ -724,7 +704,19 @@
|
||||
<p style="margin: 0">
|
||||
<span
|
||||
style="
|
||||
color: #858588;
|
||||
font-family: Arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 24px;
|
||||
"
|
||||
>{{code}}</span
|
||||
>
|
||||
</p>
|
||||
<p style="margin: 0">
|
||||
<span
|
||||
style="
|
||||
color: #716c6c;
|
||||
font-family: Arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 15px;
|
||||
"
|
||||
>Please copy and paste this
|
||||
@ -748,134 +740,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
align="center"
|
||||
class="r3-o"
|
||||
style="table-layout: fixed; width: 100%"
|
||||
>
|
||||
<tr>
|
||||
<td class="r15-i">
|
||||
<table
|
||||
width="100%"
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
>
|
||||
<tr>
|
||||
<th
|
||||
width="100%"
|
||||
valign="top"
|
||||
class="r5-c"
|
||||
style="font-weight: normal"
|
||||
>
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r6-o"
|
||||
style="table-layout: fixed; width: 100%"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
valign="top"
|
||||
class="r7-i"
|
||||
style="
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
"
|
||||
>
|
||||
<table
|
||||
width="100%"
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
>
|
||||
<tr>
|
||||
<td class="r16-c" align="center">
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="570"
|
||||
class="r3-o"
|
||||
style="table-layout: fixed"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r17-i"
|
||||
style="
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
height: 1px;
|
||||
"
|
||||
>
|
||||
<table
|
||||
width="100%"
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
>
|
||||
<tr>
|
||||
<td>
|
||||
<table
|
||||
width="100%"
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
border="0"
|
||||
role="presentation"
|
||||
valign=""
|
||||
class="r17-i"
|
||||
height="1"
|
||||
style="
|
||||
border-top-style: solid;
|
||||
background-clip: border-box;
|
||||
border-top-color: #efefef;
|
||||
border-top-width: 1px;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
height="0"
|
||||
style="
|
||||
font-size: 0px;
|
||||
line-height: 0px;
|
||||
"
|
||||
>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
@ -938,7 +802,7 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r18-o"
|
||||
class="r15-o"
|
||||
style="
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@ -993,7 +857,7 @@
|
||||
<td
|
||||
align="left"
|
||||
valign="top"
|
||||
class="r19-i nl2go-default-textstyle"
|
||||
class="r16-i nl2go-default-textstyle"
|
||||
style="
|
||||
color: #3b3f44;
|
||||
font-family: georgia, serif;
|
||||
@ -1046,7 +910,7 @@
|
||||
><span style="font-size: 13px"
|
||||
>, and </span
|
||||
><a
|
||||
href="https://github.com/makeplane/plane/pulls"
|
||||
href="https://github.com/makeplane/plane/issues"
|
||||
title="Plane's GitHub conversations"
|
||||
target="_blank"
|
||||
style="
|
||||
@ -1150,7 +1014,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r20-i"
|
||||
class="r17-i"
|
||||
style="padding-bottom: 5px; padding-top: 5px"
|
||||
>
|
||||
<table
|
||||
@ -1193,7 +1057,7 @@
|
||||
role="presentation"
|
||||
>
|
||||
<tr>
|
||||
<td class="r16-c" align="center">
|
||||
<td class="r18-c" align="center">
|
||||
<table
|
||||
cellspacing="0"
|
||||
cellpadding="0"
|
||||
@ -1218,7 +1082,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r21-c"
|
||||
class="r19-c"
|
||||
style="
|
||||
display: inline-block;
|
||||
"
|
||||
@ -1237,7 +1101,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r22-i"
|
||||
class="r20-i"
|
||||
style="
|
||||
padding-bottom: 10px;
|
||||
padding-left: 209px;
|
||||
@ -1255,7 +1119,7 @@
|
||||
<tr>
|
||||
<th
|
||||
width="40"
|
||||
class="r23-c mobshow resp-table"
|
||||
class="r21-c mobshow resp-table"
|
||||
style="
|
||||
font-weight: normal;
|
||||
"
|
||||
@ -1266,7 +1130,7 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r24-o"
|
||||
class="r22-o"
|
||||
style="
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@ -1274,7 +1138,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r17-i"
|
||||
class="r23-i"
|
||||
style="
|
||||
font-size: 0px;
|
||||
line-height: 0px;
|
||||
@ -1315,7 +1179,7 @@
|
||||
</th>
|
||||
<th
|
||||
width="40"
|
||||
class="r23-c mobshow resp-table"
|
||||
class="r21-c mobshow resp-table"
|
||||
style="
|
||||
font-weight: normal;
|
||||
"
|
||||
@ -1326,7 +1190,7 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r24-o"
|
||||
class="r22-o"
|
||||
style="
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
@ -1334,7 +1198,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r17-i"
|
||||
class="r23-i"
|
||||
style="
|
||||
font-size: 0px;
|
||||
line-height: 0px;
|
||||
@ -1375,7 +1239,7 @@
|
||||
</th>
|
||||
<th
|
||||
width="40"
|
||||
class="r23-c mobshow resp-table"
|
||||
class="r21-c mobshow resp-table"
|
||||
style="
|
||||
font-weight: normal;
|
||||
"
|
||||
@ -1386,14 +1250,13 @@
|
||||
border="0"
|
||||
role="presentation"
|
||||
width="100%"
|
||||
class="r22-o"
|
||||
class="r24-o"
|
||||
style="
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
"
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r23-i"
|
||||
class="r17-i"
|
||||
style="
|
||||
font-size: 0px;
|
||||
@ -1435,7 +1298,7 @@
|
||||
</th>
|
||||
<th
|
||||
width="32"
|
||||
class="r23-c mobshow resp-table"
|
||||
class="r21-c mobshow resp-table"
|
||||
style="
|
||||
font-weight: normal;
|
||||
"
|
||||
@ -1454,7 +1317,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r17-i"
|
||||
class="r23-i"
|
||||
style="
|
||||
font-size: 0px;
|
||||
line-height: 0px;
|
||||
@ -1518,7 +1381,7 @@
|
||||
>
|
||||
<tr>
|
||||
<td
|
||||
class="r20-i"
|
||||
class="r17-i"
|
||||
style="padding-bottom: 5px; padding-top: 5px"
|
||||
>
|
||||
<table
|
||||
@ -1598,8 +1461,8 @@
|
||||
>
|
||||
<span style="font-size: 12px"
|
||||
>This email was sent to
|
||||
{{email}}. Please delete if
|
||||
you aren't the intended
|
||||
{{email}}. Please delete
|
||||
if you aren't the intended
|
||||
recipient.</span
|
||||
>
|
||||
</p>
|
||||
|
@ -664,12 +664,13 @@
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-family: Georgia;
|
||||
font-family: arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 17px;
|
||||
"
|
||||
><b>{{first_name}}</b> has invited you
|
||||
to join them in
|
||||
<b>{{workspace_name}}</b> on Plane.
|
||||
<b>{{workspace_name}}</b>, a workspace for projects and progress, on Plane.
|
||||
Some of our users have told
|
||||
us it's a privilege, but we
|
||||
will let you be the judge of
|
||||
@ -746,7 +747,8 @@
|
||||
display: block;
|
||||
-webkit-text-size-adjust: none;
|
||||
color: #ffffff;
|
||||
font-family: georgia, serif;
|
||||
font-family: arial,
|
||||
helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
"
|
||||
>
|
||||
@ -1069,7 +1071,7 @@
|
||||
><span style="font-size: 13px"
|
||||
>, and </span
|
||||
><a
|
||||
href="https://github.com/makeplane/plane/pulls"
|
||||
href="https://github.com/makeplane/plane/issues"
|
||||
title="Plane's GitHub conversations"
|
||||
target="_blank"
|
||||
style="
|
||||
|
Loading…
Reference in New Issue
Block a user