Files
notifications-admin/app/templates/components/sms-message.html
Chris Hill-Scott 6bfb7914e2 Respect linebreaks in templates
If a user puts a linebreak in an SMS template then the recipient will
see these linebreaks on their phone. So when we show a preview of an SMS
template, it should have linebreaks in it.
2016-04-11 17:20:25 +01:00

32 lines
765 B
HTML

{% macro sms_message(
body, recipient=None, name=None, id=None, edit_link=None, from=None
) %}
{% 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 %}
<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 recipient %}
<p class="sms-message-recipient">
{{ recipient }}
</p>
{% endif %}
{% if id %}
<p class="sms-message-recipient">
Template ID: {{ id }}
</p>
{% endif %}
{% endmacro %}