mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 02:28:25 -04:00
Add recipient to message previews
When previewing a template on the send page, having the recipient appear as a placeholder should help reinforce the relationship between the columns in the CSV and the placeholders. Then, when previewing a message, having the template populated with the first recipient’s email address/phone number should reinforce that relationship again.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
{% macro email_message(subject, body, name=None, edit_link=None, from_name=None, from_address=None) %}
|
||||
{% macro email_message(
|
||||
subject,
|
||||
body,
|
||||
name=None,
|
||||
edit_link=None,
|
||||
from_name=None,
|
||||
from_address=None,
|
||||
recipient=None,
|
||||
show_placeholder_for_recipient=False
|
||||
) %}
|
||||
{% if name %}
|
||||
<h3 class="email-message-name">
|
||||
{% if edit_link %}
|
||||
@@ -20,6 +29,20 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if recipient is not none %}
|
||||
<tr>
|
||||
<th>To</th>
|
||||
<td>
|
||||
{% if show_placeholder_for_recipient %}
|
||||
<span class="placeholder">
|
||||
email address
|
||||
</span>
|
||||
{% else %}
|
||||
{{ recipient }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if subject %}
|
||||
<tr class="email-message-meta">
|
||||
<th>Subject</th>
|
||||
|
||||
Reference in New Issue
Block a user