error when users put non-GSM chars in a sms template

additionally, this moves the formatted_list jinja macro into a python
function, so that it can be called from the form validator
This commit is contained in:
Leo Hemsted
2017-02-13 13:11:29 +00:00
parent cb54db82b4
commit 41fa158635
6 changed files with 51 additions and 52 deletions

View File

@@ -8,7 +8,6 @@
{% from "components/textbox.html" import textbox %}
{% from "components/file-upload.html" import file_upload %}
{% from "components/api-key.html" import api_key %}
{% from "components/list.html" import formatted_list %}
{% block per_page_title %}
Styleguide
@@ -196,19 +195,19 @@
<h2 class="heading-large">Formatted list</h2>
<p>
{{ formatted_list('A', prefix="one item called") }}
{{ 'A' | formatted_list(prefix="one item called") }}
</p>
<p>
{{ formatted_list('AB', prefix_plural="two items called") }}
{{ 'AB' | formatted_list(prefix_plural="two items called") }}
</p>
<p>
{{ formatted_list('ABC') }}
{{ 'ABC' | formatted_list }}
</p>
<p>
{{ formatted_list('ABCD', before_each='<strike>', after_each='</strike>', conjunction='or') }}
{{ 'ABCD' | formatted_list(before_each='<strike>', after_each='</strike>', conjunction='or') }}
</p>
{% endblock %}