Commit Graph

123 Commits

Author SHA1 Message Date
Chris Hill-Scott
d9e3a90123 Remove ‘You’ve’
It could be someone else who’s uploaded them.
2019-02-05 15:09:24 +00:00
Chris Hill-Scott
5a70587fe8 Refine wording of ‘already sent’ error 2019-02-05 14:59:21 +00:00
Chris Hill-Scott
ce04c9c45a Merge pull request #2725 from alphagov/job-sent-already
Warn if a file has been sent already
2019-02-05 14:55:08 +00:00
Pea Tyczynska
6b9f0675d1 Change styling of 'back to template' link on edit template postage page 2019-02-04 14:55:16 +00:00
Pea Tyczynska
29a860cf96 Move a full stop so it's outside the link 2019-02-04 14:55:16 +00:00
Pea Tyczynska
db5378bac2 Edit template postage from a separate view 2019-02-04 14:45:33 +00:00
Chris Hill-Scott
88f9d156c7 Warn if a file has been sent already
We have some teams who haver a series of files they have to send each
day. It’s easy to get muddled up and accidentally send the same file
again, if you think you haven’t already sent it.

This commit blocks you from sending the same combination of template
version and filename more than once on the same day[1].

This won’t affect teams who re-use the same template to give (for
example) updates on an incident for business continuity. These teams
edit the template between each send, thereby updating the version
number of the template.

1. This is based on how the `limit_days` argument to the API works - you
can dig into the code here: 2bd4f74ad0/app/dao/jobs_dao.py (L50)
2019-02-04 14:44:54 +00:00
Chris Hill-Scott
1675e6c8d2 Show error banner for one off letter in trial mode
In trial mode you can’t send letters. But it’s still useful to be able
to build up a letter to see how it work.

Best place to put this error is before someone tries to send a letter
for real.
2018-10-31 14:25:49 +00:00
Chris Hill-Scott
b48305c50d Don’t have service model inherit from dict
Inheriting from `dict` has some unexpected side effects that don’t
happen with plain object. The one we want to avoid right now is that
a dict doesn’t seem to implement `__dict__` in a normal way, which
is required by `werkzeug.utils.cached_property`.
2018-10-30 14:55:00 +00:00
Chris Hill-Scott
c01d761a3c Show if a letter has been cancelled
At the moment we are manually cancelling letters for people when they
ask us to. Once’s we’ve done this there is no indication that it’s
happened except for the date going red on the list of letters.

This commit adds some error messaging and styling to show when a letter
is cancelled.

Letting people cancel their own letters will be a future enhancement.
2018-10-29 11:51:41 +00:00
Chris Hill-Scott
d9da219b7e Use a macro for form tags
This will stop us repeatedly forgetting to add `novalidate` and
`autocomplete='off'` to our forms (which is how most of them are set
up).

It uses sensible defaults, based on how we most-commonly configure
forms:
- most of our forms are `post`ed (but this can be overridden)
- `autocomplete` should only be enabled where it makes sense, otherwise
  it’s more annoying than useful (but this can be overriden)
- we should never be using HTML5 form validation because our own error
  styles and messages are better
2018-09-19 12:43:15 +01:00
karlchillmaid
7c460302a0 Merge pull request #2270 from alphagov/add-document-download-guidance-to-template
Add 'send a document by email' guidance to email template formatting guidance
2018-09-12 10:11:54 +01:00
karlchillmaid
22b6b8f412 Added a reminder to upload the document
Added a reminder to upload the document using the API.
2018-09-10 14:47:22 +01:00
Chris Hill-Scott
e4341f5d5b Indicate messages sent with a test key
If a message has been sent with a test key it’s a bit confusing to just
say ‘Delivered’ on the page, because it hasn’t gone to anyone’s phone.

So this commit adds a bit of hint text to disambiguate what ‘Delivered’
actually means in this context.
2018-09-06 10:50:19 +01:00
karlchillmaid
42417b3509 Removed link to documentation
Removed link to documentation until we have Features content we can link to, or the documentation has been updated.
2018-09-04 10:02:54 +01:00
karlchillmaid
3f3f8c5977 Reinstated link to API client documentation
Reinstated link to API client documentation because we're only showing this guidance to users who already have the send a document feature.
2018-09-03 17:04:21 +01:00
karlchillmaid
80070797f4 Added filename extension
Added filename extension
2018-09-03 15:05:19 +01:00
karlchillmaid
7ce12c88c9 Commented out the link to documentation
Commented out the link to documentation because sending a document is only described in the Python documentation at the moment.

Discussed with Chris H:
Added a line asking users to contact the team. Support can explain the situation if we get any requests. We'll remove this and reinstate the original line once this feature is available across more API clients and the documentation is updated.
2018-09-03 13:37:02 +01:00
karlchillmaid
6ccd0e6775 Added send a document by email guidance
Added send a document by email guidance
2018-08-30 16:56:09 +01:00
Chris Hill-Scott
84de1c5625 Let caseworkers send one off messages
The main task that we think ‘caseworker’ users do is send one off
messages.

So this commit:
- makes sure users who don’t have the `view_activity` permission (ie
  not ‘admin’ users) can still send messages
- adds navigation so that these users have a place to go from which to
  start the process of sending a one off message
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
adf1493fb5 Add guidance about horizontal lines
We’ve supported this for a while but don’t tell anyone how to do it.

This commit also alters the spacing of things so the description groups
better with the example.
2018-06-28 16:06:04 +01:00
Chris Hill-Scott
fffcac1682 Add guidance on how to use page breaks in letters
Useful generally, but especially since we’ve edited some team’s
templates to use this new feature, they could probably do with knowing
how it works.
2018-05-14 15:21:49 +01:00
Chris Hill-Scott
5d4fc23128 Merge pull request #1931 from alphagov/letter-status-colour
Don’t change colour of sent date for letters
2018-03-09 09:51:40 +00:00
Chris Hill-Scott
d90cdc1f81 Don’t change colour of sent date for letters
For text messages/emails it makes sense for ‘sending’ to be gray and
‘delivered’ to be black. But since we don’t show sending/delivered for
letters it doesn’t make sense for the text to change colour.
2018-03-06 13:51:50 +00:00
Chris Hill-Scott
5a68fb640f Show CSV download link for letter jobs 2018-03-06 10:24:01 +00:00
Chris Hill-Scott
a604ed60b6 Remove value of download attribute on links
We should standardise on <a download> rather than
<a download="download"> everywhere. The value of the download attribute
tells the browser what filename to use, but is overridden by the
Content-Disposition HTTP header. Since it’s not being used, we should
remove it for the sake of disambiguation.
2018-01-02 16:52:17 +00:00
chrisw
43395bc9d9 Added letters info to service / admin dashboard & activity page 2017-10-03 10:28:34 +01:00
Pete Herlihy
7a7e71ce5d Adding Using Notify to the footer links 2017-08-31 11:10:39 +01:00
Chris Hill-Scott
32ae0a9b36 Merge pull request #1364 from alphagov/letter-job-page-real
Customise the job page to make sense for letters
2017-07-21 13:10:09 +01:00
Chris Hill-Scott
82233340b6 Track errors when uploading spreadsheets
Uses the new javascript event tracking stuff so that we can see what
errors people are getting when they upload spreadsheets.
2017-07-20 12:06:15 +01:00
Chris Hill-Scott
8e947f315d Refactor check error templates to repeat less
There was a lot of repetetive wrapping code being repeated for every
conditional block in these files. Let’s wrap it around the whole
conditional bit once instead.
2017-07-20 12:00:56 +01:00
Chris Hill-Scott
ad897cd820 Hide report on letter job 2017-07-18 11:00:53 +01:00
Chris Hill-Scott
7881753193 Replace blue boxes with total + delivery estimate
The sending/failed/delivered thing:
- doesn’t map to the actual states of letters
- doesn’t respond quickly enough to give you feedback that something is
  happening (because "sending" doesn’t even go to "probably delivered"
  for a few days)

This commit replaces these 4 boxes with some more useful information:
- one number – how many letters were in the job in total
- when we estimate that the letters will be delivered
2017-07-18 11:00:08 +01:00
Chris Hill-Scott
202c9aea62 Hide status for individual letters
The status for each letter in a job will be the same for every single
letter (at least until we start dealing with returns).

It’s redundant to show this information over and over again. This commit
removes it.
2017-07-18 10:37:54 +01:00
Chris Hill-Scott
c940c8a8d8 Never say ‘report is 100% complete…’ on job page
This message is meant to indicate that generating the report is still in
progress. Saying 100% contradicts this because 100% sounds like
‘complete’.

Reason this is happening is because rounding 99.5 to 0 decimal places
gives you 100.

So let’s make sure it never gets above 99.0
2017-07-03 16:56:26 +01:00
Chris Hill Scott
140d3eeb09 Remove tour-related stuff from the job page
The tour does the send one-off thing now, rather than creating a
job.
2017-07-03 15:43:28 +01:00
Chris Hill-Scott
9f20ea4b7e Revert "Merge pull request #1336 from alphagov/revert-show-notifications"
This reverts commit 7e354ff341, reversing
changes made to 6f3bcff32f.
2017-06-30 14:01:18 +01:00
Leo Hemsted
87aeec1b8d add other send notification error branches and tests 2017-06-29 16:10:59 +01:00
Leo Hemsted
42e33ce9e6 make partials source-agnostic
they're currently expecting a RecipientsCSV object - but we won't
always have that available if we're handling a single notification.

So make the partials take generic variables, and then use a jinja with
block to pass in the correct values from either the check csv page or
the check notification page.

Additionally set the notification check page to show errors nicely -
hide the send button if there were problems, and replace the header
2017-06-29 15:33:31 +01:00
Leo Hemsted
f1ecee8469 add template partials for some notification checks
also move out some from the check.html page. This is going to help
with sharing templates between single notifications and csv files.
2017-06-29 12:40:03 +01:00
Chris Hill-Scott
b450a349a3 Revert "Merge pull request #1328 from alphagov/notification-page-reworked"
This reverts commit 1797162248, reversing
changes made to 95b4d9eb31.
2017-06-23 15:56:25 +01:00
Chris Hill-Scott
3cec61f2f5 Revert "Re-add IDs for each notification to the jobs page" 2017-06-23 11:22:49 +01:00
Chris Hill-Scott
27a212ad15 Re-add IDs for each notification to the jobs page
The functional tests use this for the sending a CSV flow here:
4ee47db851/tests/pages/pages.py (L365)
2017-06-23 10:45:57 +01:00
Chris Hill-Scott
b8cc0de44e Use file list pattern for notifications
Most of our tables are now lists which have:
- a thing you click on
- some secondary info about that thing underneath
- some extra numbers/status on the right hand side

Since these are so similar, they should share the same pattern, which
this commit does (using the `file-list` pattern).

Visually this means:
- the secondary text on the inbox becomes grey not black, for
  consistency
- the status bit of the notifications tables bottom align like the
  status of messages in the inbox

These both seem like OK changes to make for the sake of consistency.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
ff4a580ab4 Indicate template on scheduled jobs
We’ve removed the template on the jobs page, so you can no longer see
which template a job is about to be sent with.

This is removing information which might enable you to undo a costly
mistake.

I don’t think we need to bring back the whole template – giving its
name, and a link to it meets the need just as well.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
c554e9e32d Put template content or subject in tables
In tables where we show rows and rows of information we used to give
some meta information about the notification, or at least as much as we
could give in the very limited space available.

This information is now on the notifications page, so the information we
show in these tables should just be whatever helps users identify the
right message. I reckon that this is:
- the content of the message for text messages
- the subject for emails and letters

This also makes these pages consistent with:
- the inbound SMS page
- the way the people’s inboxes work for their text
  messsages/Whatsapps/emails

For consistency’s sake this makes the job page work the same way. It may
be slightly less useful here because on the job page every message is
sent from the same template, so will have broadly the same content.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
929e2b841f Put notification meta above message, remove AJAX
The meta info about a notification (who sent it, when they sent it)
won’t ever change, so there’s no need for it to reload it using AJAX.

Putting it above the message and under the `<h1>` makes it match how
this information is displayed on the job page.

On the job page this information is bold, but visually the job page is
using too much bold now (nothing is emphasised/differentiated if
everything is bold). So this commit also makes this line of info regular
on both the notification and job pages.
2017-06-21 16:21:34 +01:00
Chris Hill-Scott
b578c3589b Put status under message
Since we’ve removed the table of notifications from the single
notification page there’s no way of knowing the status of a
notification.

This re-adds it in a way that’s similar to how it looks on inbound
messages.
2017-06-21 15:15:13 +01:00
Chris Hill-Scott
7d0aed0ae8 Link to each recipient on activity and job pages
We have a page for individual notifications now.

On the job and activity pages each row of the table represents an
individual notification. So it makes sense for these things to be linked
together, so that a user can navigate from one to the other.

This will make more sense once we make some more changes to the
individual notification page.
2017-06-21 15:09:43 +01:00
Leo Hemsted
09dc85e5bc Clean up code to remove unnecessary paths.
Status code was overcomplex, given how we control the inputs. Now, it
expects a single value, rather than a comma separated list, and if you
give something it doesn't expect it just returns all. Note, it won't
select the correct box - but if you've been manually editing the URL
that's your own problem ¯\_(ツ)_/¯

Also, as this page will only ever be shown from the tour (tutorial),
it doesn't need some non-help things - such as the download csv button
and associated endpoint.
2017-06-16 15:28:17 +01:00