diff --git a/blender-bfct/application/emails.py b/blender-bfct/application/emails.py index 39bef94..cbf73c8 100644 --- a/blender-bfct/application/emails.py +++ b/blender-bfct/application/emails.py @@ -25,7 +25,11 @@ def send_email(subject, sender, recipients, text_body, html_body): def send_email_notification_new_submission(application): board_members = get_board_members_emails() - send_email("[BFCT] New BFCT application submitted", + if application.user.first_name: + applicant = application.user.first_name + " " + application.user.last_name + else: + applicant = application.user.email + send_email("[BFCT] " + applicant + " applied for BFCT", 'bfct-robot@blender.org', board_members, render_template("email/new_submission.txt", diff --git a/blender-bfct/application/templates/applications/view.html b/blender-bfct/application/templates/applications/view.html index 0e7d4c6..949f7c4 100755 --- a/blender-bfct/application/templates/applications/view.html +++ b/blender-bfct/application/templates/applications/view.html @@ -3,7 +3,12 @@ {% block body %}
{{application.bio_message|safe}}
Hello there fellow BFCT member!
-A new BFCT application awaits your review! Check it out at the BFCT portal.
+Hello there fellow BFCT board member!
+ ++ {% if application.user.first_name %} + {{application.user.first_name }} {{ application.user.last_name }} + {% else %} + {{application.user.email}} + {% endif %} + just applied for BFCT! +
+Check out her/his submission at the BFCT portal.
The BFCT robot
diff --git a/blender-bfct/application/templates/email/new_submission.txt b/blender-bfct/application/templates/email/new_submission.txt index 60e744a..e66c33b 100644 --- a/blender-bfct/application/templates/email/new_submission.txt +++ b/blender-bfct/application/templates/email/new_submission.txt @@ -1,4 +1,11 @@ Hello there fellow board member! -A new BFCT application awaits your review! Check it out at http://www.blender.org/certification{{url_for('applications.view', id=application.id)}}. + +{% if application.user.first_name %} +{{application.user.first_name }} {{ application.user.last_name }} just applied for BFCT! +{% else %} +{{application.user.email}} just applied for BFCT! +{% endif %} + +Check out her/his submission at http://www.blender.org/{{url_for('applications.view', id=application.id)}}. The BFCT robot