diff --git a/opentech/apply/activity/messaging.py b/opentech/apply/activity/messaging.py index 34b07c2fe5213aa151c063a3551692c94f345767..143234c8d3554950b6d290f4a9b5ca1be988da44 100644 --- a/opentech/apply/activity/messaging.py +++ b/opentech/apply/activity/messaging.py @@ -151,14 +151,7 @@ class EmailAdapter(AdapterBase): } def email_from_submission(self, submission, **kwargs): - email_data = submission.page.specific - context = { - 'name': submission.user.get_full_name(), - 'email': submission.user.email, - 'project_name': submission.form_data.get('title'), - 'extra_text': email_data.confirmation_text_extra, - 'fund_type': email_data.title, - } + context = {'submission': submission} return render_to_string('funds/email/confirmation.txt', context) def send_message(self, message, submission, **kwargs): diff --git a/opentech/apply/funds/templates/funds/email/confirmation.txt b/opentech/apply/funds/templates/funds/email/confirmation.txt index 6756377e3ca2e9ed4f5726981776b543484a050e..1d08ad5b32e0aee9a0d384ccef5ee4486c1aff63 100644 --- a/opentech/apply/funds/templates/funds/email/confirmation.txt +++ b/opentech/apply/funds/templates/funds/email/confirmation.txt @@ -1,16 +1,18 @@ -Dear {{ name|default:"applicant" }}, +Dear {{ submission.user.get_full_name|default:"applicant" }}, -We appreciate your {{ fund_type }} application submission to the Open Technology Fund. We will review and reply to your -submission as quickly as possible. Our reply will have the next steps for your {{ fund_type }} application. +{% with email_context=submission.page.specific %} +We appreciate your {{ email_context.title }} application submission to the Open Technology Fund. We will review and reply to your +submission as quickly as possible. Our reply will have the next steps for your {{ email_context.title }} application. You can find more information about our support options, review process and selection criteria on our website. -{% if extra_text %}{{ extra_text }}{% endif %} +{{ email_context.confirmation_text_text }} +{% endwith %} If you have any questions, please email us at info@opentechfund.org. -{% if project_name %}Project name: {{ project_name }}{% endif %} -{% if name %}Contact name: {{ name }}{% endif %} -{% if email %}Contact email: {{ email }}{% endif %} +Project name: {{ submission.title }} +Contact name: {{ submission.user.get_full_name }} +Contact email: {{ submission.user.email }} Thanks again, The OTF Team