Commit 08d8bf5f authored by Daniel W Bond's avatar Daniel W Bond
Browse files

farewell email now incorporates new base email templates

parent de57dd32
<html>
<head>
<title>You successfully deleted your account on Roomlist</title>
<style type="text/css">
body { font-family: "Verdana", sans-serif; }
a { color:#006633; }
a:active { color:#FFCC33; }
a:visited { color: #004C25; }
</style>
</head>
<body>
<p>Dear {{ student_name }},</p>
<br />
<p>We have removed your account from Roomlist.</p>
<p>{{ special_message }}</p>
<p>:-)</p>
<br />
<p>---</p>
<p>Mason SRCT</p>
<p>
<small><a href="https://srct.gmu.edu/">SRCT</a> is a
<a href="https://getconnected.gmu.edu/organization/srct">
registered student organization</a> at
<a href="https://www2.gmu.edu/">George Mason University</a>. We have written and
provide this project for the benefit of our school's community, but offer no
claims to the accuracy of the information provided on our site by other student
users. We are not affiliated with Mason Housing. The source code for this project
is available and
<a href="https://www.gnu.org/licenses/gpl-3.0.html/">freely licensed</a> at
<a href="https://git.gmu.edu/srct/roomlist/">git.gmu.edu/srct/roomlist</a>.</small>
</p>
</body>
</html>
{% extends 'layouts/email_base.html' %}
{% block greeting %}
Dear {{ student_name }},
{% endblock greeting %}
{% block content %}
<p>We have removed your account from Roomlist.</p>
<p>{{ special_message }}</p>
{% endblock content %}
Dear {{ student_name }},
{% extends 'layouts/email_base.txt' %}
{% block greeting %}
Dear {{ student_name }},
{% endblock greeting %}
{% block content %}
We have removed your account from Roomlist.
{{ special_message }}
:-)
---
Mason SRCT
SRCT is a registered student organization at George Mason University. We have
written and provide this project for the benefit of our school's community, but
offer no claims to the accuracy of the information provided on our site by other
student users. We are not affiliated with Mason Housing. The source code for this
project is available and freely licensed at git.gmu.edu/srct/roomlist.
{% endblock content %}
......@@ -308,18 +308,23 @@ class DeleteStudent(LoginRequiredMixin, StudentContextMixin, FormView):
text_path = 'email/farewell.txt'
html_path = 'email/farewell.html'
subject = "You successfully deleted your account on Roomlist"
if form.cleaned_data['leaving']:
context = {
'subject': subject,
'student_name': student.get_first_name_or_uname,
'special_message': "We're glad you gave our service a try."
'special_message': "We're glad you gave our service a try.",
'signature': ':-)',
}
else:
context = {
'subject': subject,
'student_name': student.get_first_name_or_uname,
'special_message': "We wish you luck in your time after Mason!"
'special_message': "We wish you luck in your time after Mason!",
'signature': ':-)',
}
subject = "You successfully deleted your account on Roomlist"
to = user.email
student_email = create_email(text_path, html_path, subject, to, context)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment