From 122ae3b4d1ff4baa74a31660b8821b907e7a9982 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Fri, 27 Jul 2018 12:36:29 +0100 Subject: [PATCH] Add the transition email --- opentech/apply/activity/messaging.py | 3 ++- .../apply/activity/templates/messages/email/transition.html | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 opentech/apply/activity/templates/messages/email/transition.html diff --git a/opentech/apply/activity/messaging.py b/opentech/apply/activity/messaging.py index c6bb13152..b5bf6cee3 100644 --- a/opentech/apply/activity/messaging.py +++ b/opentech/apply/activity/messaging.py @@ -153,6 +153,7 @@ class EmailAdapter(AdapterBase): messages = { MESSAGES.NEW_SUBMISSION: 'funds/email/confirmation.html', MESSAGES.COMMENT: 'notify_comment', + MESSAGES.TRANSITION: 'funds/email/transition.html', } def notify_comment(self, **kwargs): @@ -164,7 +165,7 @@ class EmailAdapter(AdapterBase): return render_to_string(template, kwargs) def send_message(self, message, submission, **kwargs): - subject = submission.page.specific.subject or 'Thank you for your submission to Open Technology Fund' + subject = submission.page.specific.subject or 'Your application to Open Technology Fund: {submission.title}'.format(submission) send_mail( subject, message, diff --git a/opentech/apply/activity/templates/messages/email/transition.html b/opentech/apply/activity/templates/messages/email/transition.html new file mode 100644 index 000000000..7bee07e66 --- /dev/null +++ b/opentech/apply/activity/templates/messages/email/transition.html @@ -0,0 +1,5 @@ +{% extends "messages/email/base.html" %} + +{% block content %} +Your application has been progressed from {old_phase.display_name} to {submission.phase}. +{% endblock %} -- GitLab