Add a template filter for message placeholders

As a first guess placeholders can be added to messages with the
`((placeholder))` syntax.

This commit adds a Jinja template filter to convert strings containing
said-formatted strings into HTML, which can then be styled to highlight which
parts will be substituted in messages.
This commit is contained in:
Chris Hill-Scott
2015-12-10 16:26:53 +00:00
parent a5f4580a7f
commit b46872d2b9
3 changed files with 23 additions and 6 deletions

View File

@@ -9,12 +9,16 @@
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Send text messages</h1>
<p>This page will be where we construct text messages</p>
{{ sms_message("hi") }}
{{ sms_message("
Vehicle tax: Your vehicle tax for ((registration number)) expires on
((date)). Tax your vehicle at www.gov.uk/vehicle-tax
") }}
<p>
<a class="button" href="check-sms" role="button">Continue</a>
<a class="button" href="check-sms" role="button">Continue</a>
</p>
</div>
</div>