Commit Graph

12 Commits

Author SHA1 Message Date
Chris Hill-Scott
91565afa6b Change display of placeholder columns
On the send page, it should hightlight the placeholders so they match
what you need to put in the CSV file.

On the check page, they should not be highlighted, to match what’s in
the (rendered) template.
2016-04-11 17:20:24 +01:00
Chris Hill-Scott
39e94ac8ec Add row numbers to tables
When a table is showing the contents of a CSV file, it should look
something like a spreadsheet.

The minimally skeuomorphic way to do this is by adding row numbers.

This commit doesn’t
- make the row numbers monospace (it’s barely noticeable and doesn’t
  reflect what actual spreadsheets do)
- make the first column heading ‘Row’ (again, doesn’t reflect how actual
  spreadsheets work, and takes up more valuable space)
2016-04-06 11:31:37 +01:00
Chris Hill-Scott
7153be1fc6 Fix incorrect heading on send page
Accidentally reverted here: f84797e6d5 (diff-f7abe60b3b6c55859d983b3e19008838L14)

Matches the link on the choose template page.
2016-04-05 11:20:52 +01:00
Nicholas Staples
c31c55666b Added current_service to flask context and template context.
Fix all tests and conflicts.

Removed comment line.
2016-04-04 17:01:20 +01:00
Chris Hill-Scott
f84797e6d5 Show an example of a CSV on the ‘send’ page
This should help:
- understanding of what the CSV should contain
- understanding what ‘download example’ will do
2016-04-04 11:09:18 +01:00
Chris Hill-Scott
7625e184e2 Replace ‘send a batch’ with ‘send from a CSV file’
This is better. Not done enough testing to know if it’s the best, but
let’s try it.
2016-04-04 09:38:14 +01:00
Chris Hill-Scott
8e7b0edc4d Add page explaining how to send template using API
Would like to test something like this and see how well it works.

Intention of having this page is so:
- template IDs are discoverable (https://www.pivotaltracker.com/story/show/115404593)
- it’s obvious there’s an ‘automated’ way to send messages, as well as the CSV
  way (we’ve seen people oblivious to this in research)
2016-03-15 07:11:01 +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
Chris Hill-Scott
0cce5db3d1 Give users better guidance about CSV files
This commit adds some guidance on the ‘Add recipients’ page about what should
be in the CSV file. The guidance is contextual to the template, and based on
the problems that we saw users having yesterday.
2016-02-26 16:23:56 +00:00
Chris Hill-Scott
2f91848a42 Prefix text messages with service name
Brings in: https://github.com/alphagov/notifications-utils/pull/4
2016-02-26 11:57:13 +00:00
Chris Hill-Scott
a51d92c87a Consolidate page templates for emails + texts
Use one page template for each of:
- choosing a message template
- adding recipients
- checking an email message
- looking at a job

This commit consolidates the two templates into one, and adds logic to show
the SMS message pattern or the email message pattern depending on the type of
template.

It also gives email templates a bit more width, because the body and the from
address tend to be quite long.
2016-02-26 11:57:13 +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