Commit Graph

9660 Commits

Author SHA1 Message Date
Pea Tyczynska
86ab0a6a0f Add missing test cases for precompiled validation messages 2020-04-02 13:39:40 +01:00
Pea Tyczynska
0a7fa1f799 Update content for postcode valdiation handling for precompiled 2020-04-02 11:45:57 +01:00
Pea Tyczynska
5036511803 Handle postcode validation 2020-04-02 11:23:17 +01:00
Chris Hill-Scott
c448eb8995 Merge pull request #3388 from alphagov/remove-contact-list-hint
Remove line about contact lists from uploads
2020-04-02 11:04:14 +01:00
Chris Hill-Scott
1947b62ed9 Merge pull request #3396 from alphagov/fix-relative-date-for-returned-letters
Fix relative date for returned letters
2020-04-02 09:58:31 +01:00
Chris Hill-Scott
e8b5de533d Fix relative date for returned letters
It was saying ‘16 hours ago’ instead of today. This is because, in
strftime:
- `%M` means minute, not month
- `%D` means short MM/DD/YY date, not day of the month

The test wasn’t catching this because the freeze time and mocked value
from the API were set to the same minute.
2020-04-01 17:38:06 +01:00
Chris Hill-Scott
84e063c901 Merge pull request #3371 from alphagov/flask-login-again
Flask login (but backwards compatible)
2020-04-01 16:14:38 +01:00
Chris Hill-Scott
3752b44ce8 Merge pull request #3369 from alphagov/address-block-part-deux
one off letter address form part deux
2020-04-01 16:14:27 +01:00
Chris Hill-Scott
fef822d470 Merge pull request #3395 from alphagov/update-humanize
Update humanize from 1.0.0 to 2.2.0
2020-04-01 16:00:50 +01:00
pyup-bot
1dc9f0aa5d Update humanize from 1.0.0 to 2.2.0 2020-04-01 14:37:12 +01:00
Chris Hill-Scott
3895794208 Merge branch 'master' into flask-login-again 2020-04-01 14:29:16 +01:00
Chris Hill-Scott
f6a286ca4f Merge pull request #3314 from alphagov/itsdangerous-upgrade
Upgrade itsdangerous
2020-04-01 13:50:49 +01:00
Chris Hill-Scott
7930dc0b4a Merge pull request #3345 from alphagov/returned-letters-stats
Use statistics for returned letters on dashboard
2020-04-01 10:44:08 +01:00
Chris Hill-Scott
61d87bf6c0 Let platform admins delete returned letters cache
Just in case there’s ever a problem with something in these caches. We
missed this before.
2020-04-01 10:18:56 +01:00
Chris Hill-Scott
7fb8e1de92 Use statistics for returned letters on dashboard
This should be faster and more accurate than querying all the reports.
2020-04-01 10:18:55 +01:00
Leo Hemsted
3529188968 redirect from address_line_n to address textarea page
if someone starts a new one-off flow they'll get taken to the address
page. However, if someone hits the back button, they'll cycle backwards
through placeholders and will end up on the individual line pages. Lets
redirect them to the correct place.

We'll additionally need to reconstruct the address block from the
various session variables that may or may not be populated
2020-03-31 16:59:48 +01:00
Leo Hemsted
c3fa8ab2e1 Merge pull request #3368 from alphagov/address-block
one off letter address form
2020-03-31 16:08:11 +01:00
Pea M. Tyczynska
2bb47af3c3 Merge pull request #3389 from alphagov/fix-unhandled-errpr
Fix bug where adding same reply-to-email twice for the same service caused a 5xx
2020-03-31 14:08:02 +01:00
Katie Smith
f7f31de2e7 Merge pull request #3394 from alphagov/bump-utils
Bump utils to 36.9.3 to bring in new version of Bleach
2020-03-31 11:08:12 +01:00
Katie Smith
435081a2a4 Bump utils to 36.9.3 to bring in new version of Bleach 2020-03-31 08:59:45 +01:00
Leo Hemsted
c4d839d4f5 input letter address data in a single block
rather than in multiple placeholders - this is the first step towards
making postcodes non-required, which is the first step towards
international letters.

they still populate address_line_# and postcode fields under the hood -
to keep validation working the same, the last line always goes into
`postcode`.

the form normalises whitespace, removes extra new lines, and enforces
that you have between three and seven lines.

if the letter repeats address placeholders further down (eg "Dear
((address_line_1))"), then it'll fill those in as well. It'll still
prompt you to fill them in, but they'll be pre-filled.
2020-03-30 19:29:26 +01:00
Leo Hemsted
df51bf6f5f small QOL changes in conftest
if we are asserting on a redirect we expect the result to be 302 (you
could still override this to 301 if you want).

also give some function calls kwargs to make them easier to read
2020-03-30 18:05:50 +01:00
Pea Tyczynska
ebe2c1c4ae Accept 409 conflict response code when reply-to address already exists
Also stop checking error message.
2020-03-30 17:31:00 +01:00
Chris Hill-Scott
57ec58ab4e Merge pull request #3377 from alphagov/delete-contact-list
Let users delete a contact list
2020-03-27 16:13:32 +00:00
Chris Hill-Scott
3aabe7cce8 Merge pull request #3390 from alphagov/tabular-numbers-template-stats
Use tabular figures for template statistics
2020-03-27 09:56:10 +00:00
Chris Hill-Scott
dd6944e8ef Use tabular figures for template statistics
We use tabular (not lining) figures everywhere else that we display
counts, so that they don’t shift around as the AJAX updates the numbers.

There’s a good explanation of the difference here:
https://www.fonts.com/content/learning/fontology/level-3/numbers/proportional-vs-tabular-figures
2020-03-27 09:30:28 +00:00
Pea Tyczynska
6e78541008 Fix bug where adding same reply-to-email twice for the same service caused a 5xx
This was due to changed quotataion marks in error message.
2020-03-26 17:44:19 +00:00
Chris Hill-Scott
7582b8face Remove line about contact lists from uploads
This line doesn’t make sense now that you can upload a contact list in
advance of having a template.
2020-03-26 17:17:11 +00:00
Chris Hill-Scott
8a093fd34c Merge pull request #3338 from alphagov/remove-permission-checks-uploads
Clean up the codebase after moving everyone to the new uploads page
2020-03-26 17:00:16 +00:00
Chris Hill-Scott
d41d0cfb67 Merge pull request #3387 from alphagov/add-who-can-use-page
Add ‘Who it’s for’ page
2020-03-26 15:15:44 +00:00
Chris Hill-Scott
971ecde37a Update list of organisation types
Adds emergency services to cover more than just fire and police (eg
coastguard).

Adds armed forces and GP practices for people who might not be sure that
they’re covered under MOD and the NHS respectively.
2020-03-26 14:55:51 +00:00
Chris Hill-Scott
db2d312ba7 Link to ‘who it’s for’ when error creating account
If someone enters an email address from a domain we don’t recognise we
direct them straight to our support channel. This is causing increased
contact from suppliers and members of the public.

Now that we have a page which explains who can use Notify, let’s direct
people there first. Then if they really do need to contact support
(because we don’t recognise their organisation) then they can do so from
that page.
2020-03-26 14:55:51 +00:00
Chris Hill-Scott
41dd7a883b Add who’s its for page
We have a policy about how suppliers are allowed to use Notify. But we
don’t explain it anywhere. Which drives contact to our support form.

This commit that adds a new page that explains the policy.

I’ve moved the related content about who else can use Notify from the
get started page to this page as well, where it doesn’t need to sit in
a details element.
2020-03-26 14:55:51 +00:00
Chris Hill-Scott
0a5f5cfc9c Merge branch 'master' into itsdangerous-upgrade 2020-03-25 16:40:39 +00:00
Chris Hill-Scott
38b4b4d994 Fix misaligned upload button when no letter permission
We should add spacing to the right, so if the first button is missing
the second one still sits flush-left.
2020-03-25 15:28:54 +00:00
Chris Hill-Scott
d83e7a8e9f Tidy up the jobs template 2020-03-25 15:27:26 +00:00
Chris Hill-Scott
481c9dba17 Remove unused model property 2020-03-25 13:58:23 +00:00
Chris Hill-Scott
7d57a4d9b8 Redirect the old jobs URL 2020-03-25 13:58:23 +00:00
Chris Hill-Scott
0fdabbdb5d Merge pull request #3386 from alphagov/triage-public-support
Direct members of the public raising support tickets to somewhere more useful
2020-03-25 13:27:43 +00:00
Chris Hill-Scott
2ca32019e4 Go back to triage page if you’ve come from there 2020-03-25 12:21:51 +00:00
Chris Hill-Scott
8335de1432 Use correct back link pattern on escalation page 2020-03-25 12:20:49 +00:00
Chris Hill-Scott
34a5ddaf2c Assume email always provided
There’s no way for a user to submit the form without it now.
2020-03-24 17:56:12 +00:00
Chris Hill-Scott
8e055a4375 Remove prefilled message thing 2020-03-24 17:56:12 +00:00
Chris Hill-Scott
697803a10c Add a ‘general’ ticket type
This is for tickets coming from non-logged-in users. It’s effectively
the same as reporting a problem, but doesn’t have the banner about
the status page (because we can’t tell if they’re actually reporting a
problem now we’re not asking).

It also gives a more generic page title.
2020-03-24 17:56:11 +00:00
Chris Hill-Scott
30a3418473 Refactor so constants are used everywhere 2020-03-24 17:48:13 +00:00
Chris Hill-Scott
55e377baf6 Rename and delete form templates
`report-a-problem’ becomes `form` because it’s not just being used for
problems.

'ask-a-question' gets deleted because it’s not being used.
2020-03-24 17:48:12 +00:00
Chris Hill-Scott
17a3ee920c Use the same template for problems and questions 2020-03-24 17:48:12 +00:00
Chris Hill-Scott
11cdf58256 Use the same form for problems and questions 2020-03-24 17:48:11 +00:00
Chris Hill-Scott
61ab9661fb Direct members of the public somewhere more useful
We can’t give advice to members of the public, but increasingly we’re
seeing them try to use our support form to ask.

It would be better for them if we can direct them straight to somewhere
more useful, before they have the chance to raise a support ticket.

This commit replaces the report a problem/ask a question triaging for
users who aren’t signed in. It’s not possible for non-signed-in users to
raise an priority 1 ticket, so we never need to triage the tickets in
this way.

Instead we can triage people based on whether they work in the public
sector or not. If they do then we send them on to the feedback form. If
not then they go to a new page which contains some useful links. We’ve
chosen these links based on some analysis of the support tickets we’ve
received recently[1]

1. https://docs.google.com/spreadsheets/d/1uBQn-ZnCYfz6ltFaUKZpytgvBF0-MeshCLZ1cD74R0c/edit?usp=sharing
2020-03-24 17:48:11 +00:00
Leo Hemsted
c693ef2abe Merge pull request #3385 from alphagov/bump-deployment-timeout
bump deployment timeout
2020-03-24 14:54:14 +00:00