From 8f576c22196b628389dae9b75338f800abd24841 Mon Sep 17 00:00:00 2001
From: johnyu95
Date: Tue, 31 Mar 2020 12:53:26 -0400
Subject: [PATCH] Added request type to emails for agencies using custom
request forms
---
app/models.py | 2 +-
.../email_templates/email_confirmation.html | 3 +++
.../email_request_status_changed.html | 12 ++++++++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/app/models.py b/app/models.py
index 20a78469d..8a9914a76 100644
--- a/app/models.py
+++ b/app/models.py
@@ -390,7 +390,7 @@ def is_authenticated(self):
@property
def is_active(self):
- return self.email_validated and self.terms_of_use_accepted
+ return self.email_validated
@property
def is_public(self):
diff --git a/app/templates/email_templates/email_confirmation.html b/app/templates/email_templates/email_confirmation.html
index e2c0636f2..720d3a5cf 100644
--- a/app/templates/email_templates/email_confirmation.html
+++ b/app/templates/email_templates/email_confirmation.html
@@ -12,6 +12,9 @@
+ {% if current_request.custom_metadata %}
+ Request Type: {{ current_request.description }}
+ {% endif %}
{% if file_link %}
Attached File: {{ file_link['title'] }}:
{{ file_link['filename'] }}
diff --git a/app/templates/email_templates/email_request_status_changed.html b/app/templates/email_templates/email_request_status_changed.html
index 59f23bf5d..d003bec75 100644
--- a/app/templates/email_templates/email_request_status_changed.html
+++ b/app/templates/email_templates/email_request_status_changed.html
@@ -7,6 +7,9 @@
{{ request.id }}
+ {% if request.custom_metadata %}
+ - Request Type: {{ request.description }}
+ {% endif %}
- Requester Last Name: {{ request.requester.last_name }}
- Request Opened: {{ request.date_submitted.strftime('%m/%d/%y') }}
@@ -23,6 +26,9 @@
{{ request.id }}
+ {% if request.custom_metadata %}
+ - Request Type: {{ request.description }}
+ {% endif %}
- Requester Last Name: {{ request.requester.last_name }}
- Request Opened: {{ request.date_submitted.strftime('%m/%d/%y') }}
@@ -46,6 +52,9 @@
{% endif %}
+ {% if request.custom_metadata %}
+ - Request Type: {{ request.description }}
+ {% endif %}
- Requester Last Name: {{ request.requester.last_name }}
- Request Opened: {{ request.date_submitted.strftime('%m/%d/%y') }}
@@ -69,6 +78,9 @@
{% endif %}
+ {% if request.custom_metadata %}
+ - Request Type: {{ request.description }}
+ {% endif %}
- Requester Last Name: {{ request.requester.last_name }}
- Request Opened: {{ request.date_submitted.strftime('%m/%d/%y') }}