diff --git a/app/constants/schemas/agencies.schema b/app/constants/schemas/agencies.schema
index 29a25617a..57a891d56 100644
--- a/app/constants/schemas/agencies.schema
+++ b/app/constants/schemas/agencies.schema
@@ -16,6 +16,12 @@
"description": "An array of agency EINs. Each EIN must be unique. Used to notify a \"parent\" agency of requests submitted to the \"child\"",
"uniqueItems": true
},
+ "use_point_of_contact": {
+ "$id": "/properties/agencies/items/properties/agency_features/properties/use_point_of_contact",
+ "type": "boolean",
+ "title": "Use Point of Contact",
+ "description": "Boolean value that determines if point of contact information should be used in email templates.",
+ },
"letters": {
"generate_letters": {
"$id": "/properties/agencies/items/properties/agency_features/properties/letters/properties/generate_letters",
diff --git a/app/response/utils.py b/app/response/utils.py
index b52c6cd88..ff3640c9a 100644
--- a/app/response/utils.py
+++ b/app/response/utils.py
@@ -1155,6 +1155,9 @@ def _acknowledgment_email_handler(request_id, data, page, agency_name, email_tem
else:
description_hidden_by_default = False
+ # Determine if point of contact should be used
+ use_point_of_contact = request.agency.agency_features.get('use_point_of_contact', False)
+
if acknowledgment is not None:
acknowledgment = json.loads(acknowledgment)
default_content = True
@@ -1165,11 +1168,13 @@ def _acknowledgment_email_handler(request_id, data, page, agency_name, email_tem
acknowledgment['date'],
data['tz_name'])
info = acknowledgment['info'].strip() or None
+ point_of_contact = assign_point_of_contact(acknowledgment.get('point_of_contact', None))
else:
default_content = False
content = data['email_content']
date = None
info = None
+ point_of_contact = None
return jsonify({"template": render_template(email_template,
custom_request_forms_enabled=custom_request_forms_enabled,
default_content=default_content,
@@ -1180,7 +1185,9 @@ def _acknowledgment_email_handler(request_id, data, page, agency_name, email_tem
agency_name=agency_name,
date=date,
info=info,
- page=page),
+ page=page,
+ use_point_of_contact=use_point_of_contact,
+ point_of_contact=point_of_contact),
"header": header}), 200
diff --git a/app/templates/email_templates/email_response_acknowledgment.html b/app/templates/email_templates/email_response_acknowledgment.html
index d41e826b9..58b7c2405 100644
--- a/app/templates/email_templates/email_response_acknowledgment.html
+++ b/app/templates/email_templates/email_response_acknowledgment.html
@@ -14,6 +14,10 @@
{{ info | safe }}
{% endif %}
+ {% if use_point_of_contact %}
+
Your request has been assigned to {{ point_of_contact.title }} {{ point_of_contact.last_name }} + ({{ point_of_contact.formatted_point_of_contact_number }}) of this office.
+ {% endif %} Please visit {{ request_id }} to view additional information and take any necessary action. {% else %} diff --git a/app/templates/response/add_acknowledgment.js.html b/app/templates/response/add_acknowledgment.js.html index b0bc481e0..cdcebc1fa 100644 --- a/app/templates/response/add_acknowledgment.js.html +++ b/app/templates/response/add_acknowledgment.js.html @@ -219,7 +219,8 @@ acknowledgment: JSON.stringify({ days: email_days.val(), date: email_date.val(), - info: tinyMCE.get('acknowledgment-email-info-text').getContent() + info: tinyMCE.get('acknowledgment-email-info-text').getContent(), + point_of_contact: point_of_contact.val() }), tz_name: jstz.determine().name() },