Skip to content
Snippets Groups Projects
Commit f90967f0 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

enable comments to trigger emails

parent f3d14304
No related branches found
No related tags found
No related merge requests found
...@@ -148,11 +148,14 @@ class EmailAdapter(AdapterBase): ...@@ -148,11 +148,14 @@ class EmailAdapter(AdapterBase):
adapter_type = 'Email' adapter_type = 'Email'
messages = { messages = {
MESSAGES.NEW_SUBMISSION: 'email_from_submission', MESSAGES.NEW_SUBMISSION: 'email_from_submission',
MESSAGES.COMMENT: 'notify_comment',
} }
def notify_comment(self, comment, **kwargs):
return render_to_string('messages/email/comment.html', kwargs)
def email_from_submission(self, submission, **kwargs): def email_from_submission(self, submission, **kwargs):
context = {'submission': submission} return render_to_string('funds/email/confirmation.html', kwargs)
return render_to_string('funds/email/confirmation.txt', context)
def send_message(self, message, submission, **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 'Thank you for your submission to Open Technology Fund'
......
Dear {{ submission.user.get_full_name|default:"applicant" }},
There has been a new comment on your application: {{ submission.title }}
{{ comment.message }}
You can access your application here: {{ request.scheme }}://{{ request.get_host }}{{ submission.get_absolute_url }}
If you have any questions, please email us at info@opentechfund.org.
Kind Regards,
The OTF Team
--
Open Technology Fund
https://www.opentech.fund/
...@@ -10,6 +10,8 @@ You can find more information about our support options, review process and sele ...@@ -10,6 +10,8 @@ You can find more information about our support options, review process and sele
If you have any questions, please email us at info@opentechfund.org. If you have any questions, please email us at info@opentechfund.org.
You can access your application at {{ submission.get_absolute_url }}
Project name: {{ submission.title }} Project name: {{ submission.title }}
Contact name: {{ submission.user.get_full_name }} Contact name: {{ submission.user.get_full_name }}
Contact email: {{ submission.user.email }} Contact email: {{ submission.user.email }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment