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.
This commit is contained in:
Chris Hill-Scott
2016-04-11 10:51:32 +01:00
parent 30e1e67c17
commit 6bfb7914e2
2 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
%sms-message-wrapper,
.sms-message-wrapper {
width: 100%;
box-sizing: border-box;
padding: $gutter-half;
@@ -9,6 +10,15 @@
white-space: normal;
margin: 0 0 $gutter 0;
clear: both;
p {
margin: 0;
}
p + p {
margin-top: 20px;
}
}
.sms-message-wrapper-with-radio {

View File

@@ -16,7 +16,7 @@
{{ from }}
</span>
{% endif %}
{{ body }}
{{ body|nl2br }}
</div>
{% if recipient %}
<p class="sms-message-recipient">