mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-06 06:20:53 -04:00
59 lines
1.4 KiB
HTML
59 lines
1.4 KiB
HTML
{% macro sms_message(
|
|
body,
|
|
recipient=None,
|
|
name=None,
|
|
id=None,
|
|
edit_link=None,
|
|
from=None,
|
|
version=1,
|
|
created_at=None,
|
|
updated_at=None,
|
|
versions_url=None,
|
|
show_placeholder_for_recipient=False,
|
|
show_id=False
|
|
) %}
|
|
{% if name %}
|
|
<h3 class="sms-message-name">
|
|
{% if edit_link %}
|
|
<a name="{{ name|linkable_name }}" href="{{ edit_link }}">{{ name }}</a>
|
|
{% else %}
|
|
{{ name }}
|
|
{% endif %}
|
|
</h3>
|
|
{% endif %}
|
|
{% if version > 1 %}
|
|
{% if updated_at %}
|
|
<p class="sms-message-updated-at">Last updated on {{ updated_at|format_date_normal }} <a href="{{ versions_url }}">see earlier versions</a></p>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if created_at %}
|
|
<p class="sms-message-updated-at">Created on {{ created_at|format_date_normal }}</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if recipient is not none %}
|
|
<p class="sms-message-recipient">
|
|
To:
|
|
{% if show_placeholder_for_recipient %}
|
|
<span class="placeholder">
|
|
phone number
|
|
</span>
|
|
{% else %}
|
|
{{ recipient }}
|
|
{% endif %}
|
|
</p>
|
|
{% endif %}
|
|
<div class="sms-message-wrapper{% if input_name %}-with-radio{% endif %}">
|
|
{% if from %}
|
|
<span class="sms-message-from">
|
|
{{ from }}
|
|
</span>
|
|
{% endif %}
|
|
{{ body|nl2br }}
|
|
</div>
|
|
{% if show_id %}
|
|
<p class="sms-message-recipient">
|
|
Template ID: {{ id }}
|
|
</p>
|
|
{% endif %}
|
|
{% endmacro %}
|