While battling the bank holiday traffic on my way home this evening I realised
why looking at the job page was causing lots of 403 errors in the Chrome
console (a spike which was reflected on the Graphite screen).
There is a separate `.json` endpoint for getting updates to a job. This enpoint
did not have the `admin=True` option set in its permissions decorator. So when
viewing a service as a platform admin you could see the page, but not receive
any AJAX-powered updates to it.
This commit refactors the `email_message` and `sms_message` UI components to
take fewer parameters.
`name`, `edit_link` and anything to do with versions are identical for both
text and email messages so I’ve moved them to the pages where you choose a
template or see the versions.
This commit also tidies up the wording and styling of the template history
stuff.
_The code for this is quite hacky and light on tests. But I’d really like to get
it in the app for the research tomorrow to see how well the feature works._
This commit changes the tour from being a set of static screens to some help
which guides you through the process of sending your first test message.
The theory behind this is that what users are really struggling with is the
concept of a variable, rather than the relationship between the placeholders and
the column headers. And like learning to program, the best way to learn is by
taking an example and modifying it to your own needs.
This means that when someone adds their first service we set them up an
example email template and an example text message template. Then there is a
guided, three step process where _all_ the user can do is send a test message to
themselves.
Once the message is sent, the user still has the example templates which they
can edit, rather than having to remember what they’re supposed to be doing.
If you’re downloading a bunch of reports from your jobs then it’s useful to be
able to differentiate between them. This commit makes it easy to do so by naming
the file with:
- the name of the template
- when the job was created
I don’t think that if there’s only one version of the template that it’s
useful to see the created at date.
The auditing stuff only becomes relevant once someone a template has been
changed.
This commit makes two main changes to what happens when a user is
in trial mode and they upload some email addresses belonging to
other people.
1. Add a specific banner error telling the user about trial mode
2. Make this error higher priority, eg it will show up before the
error about having too many recipients in your file
This means making some changes to the tests so that the example CSV
files include the user’s phone number, then making them invalid by
omitting data required by the templates.
Depends on: https://github.com/alphagov/notifications-utils/pull/34