Commit Graph

9 Commits

Author SHA1 Message Date
Nicholas Staples
1b59e5c7f1 Review comments fixed. All tests passing. 2016-03-03 09:02:56 +00:00
Nicholas Staples
dde2fba705 Merge with master again. 2016-03-02 13:53:05 +00:00
Chris Hill-Scott
b57ac2f7e5 Accept CSVs with 'email address' or 'phone number'
CSV files currently have ‘to’ as the recipient column. This is changing in
https://github.com/alphagov/notifications-api/pull/109

The admin app also has to validate that the CSV files have the right columns,
because the API expects any CSV that it’s given to have been checked (also we
want things to actually work).

This commit is the minimum code change needed. In the future it should reuse
the same code as the API for processing CSV files. This will need more thinking.
2016-03-02 10:41:35 +00:00
Nicholas Staples
ffe30c3070 Permissions added for templates and send_messages pages. All tests passing.
Fix up page heading.
2016-02-29 17:18:12 +00:00
Nicholas Staples
58351a094c Merge with master. 2016-02-29 14:59:15 +00:00
Nicholas Staples
48943527ec API keys hooked up and working. All tests passing. 2016-02-29 14:57:07 +00:00
Chris Hill-Scott
1e46922876 Make send the send flow generic
This commit parameterises all methods in the send view so that they can send
either emails or SMS messages.

It works out what kind of message it is sending from the `template_type`
property of the template object.

This means that the `Template` util class needs to know about these properties,
which means that this commit depends on:
https://github.com/alphagov/notifications-utils/pull/2

This commit does _not_ add tests for sending emails. The existing tests for
sending SMS still pass, but actually sending emails is outside the scope of
this story.
2016-02-24 09:23:38 +00:00
Nicholas Staples
32e37d89fb User permissions added with test. 2016-02-19 16:38:04 +00:00
Chris Hill-Scott
45cacd82d3 Validate CSVs fully
This commit extends the existing function to validate each row’s phone number
to also validate that all the required data is present.

It does this using the checking that the `Template` class can do when given
a template and a `dict` of values.
2016-02-18 15:07:15 +00:00