mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-26 21:31:11 -05:00
This commit refactors the `email_message` and `sms_message` UI components to take fewer parameters. `name`, `edit_link` and anything to do with versions are identical for both text and email messages so I’ve moved them to the pages where you choose a template or see the versions. This commit also tidies up the wording and styling of the template history stuff.
38 lines
804 B
HTML
38 lines
804 B
HTML
{% macro sms_message(
|
|
body,
|
|
recipient=None,
|
|
id=None,
|
|
from=None,
|
|
version=1,
|
|
updated_at=None,
|
|
versions_url=None,
|
|
show_placeholder_for_recipient=False,
|
|
show_id=False
|
|
) %}
|
|
{% 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 %}
|