Commit Graph

4 Commits

Author SHA1 Message Date
Chris Hill-Scott
bf385486cf Update test with multiple placeholders added
It wasn’t possible to test for this before because the order of
placeholders was non-deterministic. The order has been made
deterministic in https://github.com/alphagov/notifications-utils/pull/674
2019-11-27 11:30:14 +00:00
Chris Hill-Scott
534be751dd Make developer instructions more explicit
The previous ‘you need to update your API calls’ text isn’t clear enough
now that the context of the spreadsheet has been removed.
2019-11-27 10:37:29 +00:00
Leo Hemsted
41fa158635 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
2017-02-17 10:39:52 +00:00
Chris Hill-Scott
9332f57f55 Make components for nicely formatted lists
We have a couple of places now where we want nice lists made from `list`s, eg

- ‘name’, ‘date’ and ‘phone number’
- ((firstname)) ((lastname)) or ((date))

This commit adds a more generic component for doing this, which can handle:

- 1, 2, and n items
- comma (or other character) separated lists
- a conjunction between the last and one-before-last item
- characters to be inserted before and after each item, eg an opening and
  closing HTML tag

It also pulls the `list_of_placeholders` component from the breaking change
page, and makes it use the `formatted_list` component under the hood.
2016-06-05 18:39:32 +01:00