Commit Graph

8846 Commits

Author SHA1 Message Date
Chris Hill-Scott
4da9c44919 Tell users that they can search by reference
Users who have an API integration (and therefore have a way of passing
in a reference for each notification) can now search by that reference
(see https://github.com/alphagov/notifications-api/pull/2682)

This commit changes the label on the search box to tell these users that
this is possible, without changing the label for users without an API
integration, who might get confused by what ‘reference’ means.

It also makes the label consistently say ‘email address or phone number’
(ie email address is first) because this is our content style.
2019-12-17 10:19:19 +00:00
Chris Hill-Scott
9c47a2ce8f Merge pull request #3222 from alphagov/fix-days-provider-history
Fix off-by-one dates on provider history
2019-12-13 13:29:56 +00:00
Chris Hill-Scott
581296b95e Fix off-by-one dates on provider history
We chunk history entries by their YYYY-MM-DD date representation to
display them day-by-day.

However trying to convert a YYYY-MM-DD string into a timestamp is
unpredictable, and was causing our dates to be one day out (probably
because of midnight/daylight savings/general datetime horrors).

This commit changes the code to do the same thing as the history page,
which is look at the `updated_at` field on the first entry to get a
datetime object and from that the formatted date we show in the headings
on the page.
2019-12-13 13:20:56 +00:00
Chris Hill-Scott
1e233f1167 Merge pull request #3217 from alphagov/provider-priority
Display and set provider priority in a non-independent way
2019-12-13 10:19:44 +00:00
Chris Hill-Scott
1bd27b97f6 Remove change link from international SMS provider
We don’t want to set it independently from the other SMS providers.
2019-12-12 14:34:04 +00:00
Chris Hill-Scott
292b7df5a8 Add named variables for clarity 2019-12-12 14:16:38 +00:00
Chris Hill-Scott
b1e9dd3fb2 Remove redundant class 2019-12-12 13:58:57 +00:00
Chris Hill-Scott
57a602c2ab Add temporary link to change priority page
Lets you get to the new page without having to think about the design
of the existing index page.
2019-12-11 10:17:48 +00:00
Chris Hill-Scott
8122fa1d5d Simplify and add tests
Makes these assumptions:
- we don’t care about history before 29th November 2019 at 11am (this
  is when priority started to mean a proportion rather than a ranking)
- the priority of the second provider will always be the inverse of
  the first provider

Which means the code is a lot simpler/actually does what you’d expect.
2019-12-11 10:17:46 +00:00
Chris Hill-Scott
5233ee4bd9 Add a form to set priority of top 2 providers
Their priority should always add up to 100%. Currently we have to ensure
this by hand. Adding this form means there’s no way to not set their
combined priorities to 100%. And it’s a bit more of an intuitive UI than
two textboxes on separate pages.
2019-12-11 10:17:45 +00:00
Chris Hill-Scott
16ebdfeb8b Add page showing priority of two SMS providers
It’s not very useful to know the priority of one provider without
knowing the other. And these pages were never really designed, so they
weren’t super easy to understand anyway.

This commit adds a page that takes the first two text message providers
and shows their relative priority against each other.

It follows the design of the events page, as a pattern for showing a
log of historical events.
2019-12-11 10:17:44 +00:00
Leo Hemsted
9b12747bb4 Merge pull request #3221 from alphagov/add-word-template
add word doc template to upload page
2019-12-10 13:27:15 +00:00
Leo Hemsted
4186feda1b add word doc template to upload page
so that people can start to amend their word docs with more confidence.
2019-12-10 13:06:44 +00:00
David McDonald
c8f92dd498 Merge pull request #3220 from alphagov/pipe-bug
Bump utils to 36.3.1
2019-12-09 15:54:00 +00:00
David McDonald
235378cec5 Bump utils to 36.3.1 2019-12-09 13:08:14 +00:00
David McDonald
0a66ad0b72 Merge pull request #3219 from alphagov/add-letters-to-uploads-page
Updated the uploads page to include letters.
2019-12-06 15:01:09 +00:00
Rebecca Law
673a0d64d0 Refactor mock_get_uploads to return more realistic data. 2019-12-06 13:22:25 +00:00
David McDonald
022c10c20c Merge pull request #3218 from alphagov/dev-antivirus-setting
Antivirus off for development by default
2019-12-06 11:49:48 +00:00
Rebecca Law
f9e01e0b45 Fix unit tests and put the antivirus check back in 2019-12-06 10:22:23 +00:00
Rebecca Law
833a5cad8f Updated the uploads page to include letters. Now the page shows uploaded letters plus jobs.
New units tests have not been written for this page because it is very like this will be refactor and probably a new template created for the page. Some design needs to go into this page.
But we needed something ready for user research.
2019-12-05 16:14:30 +00:00
David McDonald
ff9f12c4a7 Antivirus off for development by default
I have copied the approach we use in the API for this
2019-12-05 11:18:48 +00:00
karlchillmaid
cb7d0e3813 Merge pull request #3215 from alphagov/add-contraction-to-errors
Update error messages
2019-12-04 12:34:04 +00:00
karlchillmaid
7717d5131e Fix test content 2019-12-04 12:03:07 +00:00
karlchillmaid
bdde0daeec Fix test content 2019-12-04 12:01:26 +00:00
Leo Hemsted
2e108d1877 Merge pull request #3210 from alphagov/cookies
don't set cookies on letter preview pngs
2019-12-04 10:26:26 +00:00
Leo Hemsted
3be9150dcf change letter previews to be in the no_cookies blueprint
this blueprint should be applied to every endpoint that is loaded async
(as in via a src tag on an img, iframe, etc)
2019-12-03 17:06:15 +00:00
Leo Hemsted
72acc4ebdc add no_cookie blueprint
we have a hunch that some session related issues that we've seen over
the last few weeks might be related to weird race conditions where
cookies set by subresources (image previews of letters on the send flow)
arrive just as the img request is cancelled because the user has clicked
on a button to navigate to a new page, but still manage to set the
cookie? We're not entirely sure what's going on, but we've got a hunch
that not setting cookies on image fetches sounds sensible. Images are
always loaded as a subresource (ie: through a `src` tag in an html
element), so they should never need to change the cookies, so this seems
sensible. We've done this by creating a new blueprint that doesn't set
session.permanent, and doesn't call `save_serivce_or_org_after_request`
either.

cookies are sent back to the browser if:
`sesion.modified or (session.permanent and 'REFRESH_EVERY_REQUEST')`
(where the latter is a config setting).

Turning off REFRESH_EVERY_REQUEST (which is True by default) means that
we will only update the sesion if it's been modified. In practice,
literally every request is modified in the after_request handler
`save_service_or_org_after_request`. This is accidentally convenient,
as it guarantees that we'll still send back the cookie normally even
though refresh_every_request is disabled. Sending back the cookie
updates the expiry time (20 hours), so we need to keep doing this to
preserve existing session timeout behaviour.
2019-12-03 17:06:14 +00:00
Tom Byers
27119bc15b Merge pull request #3208 from alphagov/add-govuk-frontend-backlink
Use GOVUK Frontend component for all back-links
2019-12-03 15:24:08 +00:00
Pea M. Tyczynska
0d8824c3e9 Merge pull request #3193 from alphagov/validate-against-empty-messages
Validate CSVs against rows with empty messages
2019-12-03 14:12:04 +00:00
Leo Hemsted
0d0e060c9d Merge pull request #3216 from alphagov/welsh
Welsh characters
2019-12-03 13:37:32 +00:00
Pea Tyczynska
9e0c8167ee Content changes to error messages 2019-12-03 13:36:54 +00:00
Pea Tyczynska
64b35ba337 Add addtional test cases for row errors 2019-12-03 13:36:53 +00:00
Pea Tyczynska
f265dde8ab Validate CSVs against rows with empty messages 2019-12-03 13:36:41 +00:00
Tom Byers
6b0b0dd263 Change method of getting scrollTop
The current method reports `0` in Safari, whatever
the scroll position.

Some testing across our browser matrix shows:
1. this is also the case on IOS
2. browsers in the matrix all support
   `$(window).scrollTop()`

https://scroll-position-test-page.glitch.me/#results

This changes the method to use
`$(window).scrollTop()` instead.
2019-12-03 13:27:48 +00:00
Tom Byers
da414beab9 Update pricing page with full welsh alphabet for SMS
accented characters rather than special characters. call them accented
as special is a bit wishy washy and doesn't explain what they actually
are. "Diacritics" is correct but too technical. Accented characters is
a happy middle ground

screanreaders struggle to distinguish accented letters, capitals, etc,
so by having a simple two column layout we can have the full unicode
glyph name, removing any ambiguity.
2019-12-03 13:27:13 +00:00
Katie Smith
2794187e2d Bump utils to 33.3.0 2019-12-03 13:25:06 +00:00
Tom Byers
6b7e45ca1b Remove existing Sass for backlink 2019-12-03 13:13:21 +00:00
Tom Byers
e5bc33be84 Replace all existing back-links with component
Includes:
- all existing macros
- all imports for the existing macros
2019-12-03 13:13:21 +00:00
Tom Byers
ff53b9f34f Move back-link component from GOVUK Frontend
`node_modules` isn't included on live so all
macros need copying across into the repo' code.

This adds the back-link component to the list of
macros to be copied across in `gulpfile.js`.

It also adds the files copied across as a result
of running the frontend build into the repo'.
2019-12-03 13:13:18 +00:00
karlchillmaid
0a664f00bd Add contraction 2019-12-03 11:26:04 +00:00
karlchillmaid
5660c1b584 Update contraction 2019-12-03 11:24:35 +00:00
Tom Byers
44492abef7 Add Sass for GOVUK Frontend backlink 2019-12-03 09:59:32 +00:00
Tom Byers
d6f68f3680 Merge pull request #3214 from alphagov/split-gitignore-and-cfignore
Split gitignore and cfignore
2019-12-02 17:24:37 +00:00
Tom Byers
c1de4cc51b Explain .gitignore & .cfignore differences 2019-12-02 17:19:08 +00:00
Tom Byers
ccbad51ebd Move app/.gitignore entries to .gitignore
`app/.gitignore` existed to list anything that we
wanted ignored from the repository but not listed
in `.cfignore` (which just symlinked the
`.gitinore` at the root).

Now `.gitignore` and `.cfignore` are split, this
is no longer necessary.
2019-12-02 17:00:55 +00:00
Tom Byers
200a9d479a Add .pytest_cache to the deploy-exclude list 2019-12-02 17:00:55 +00:00
Tom Byers
3e1af6078f Remove app/templates/vendor from .cfignore
It's created by `npm run build` so needs to be
part of the code zipped up by
`make build-paas-artifact`.
2019-12-02 16:58:42 +00:00
Tom Byers
73b9807102 Replace .cfignore symlink with .gitignore
Instead of having `.cfignore` as a symlink to
`.gitignore`, have them as separate files,
with the same content.
2019-12-02 16:23:02 +00:00
Tom Byers
fcb806f380 Merge pull request #3212 from alphagov/remove-templates-vendor-folder
Add templates vendor folder to gitignore & delete
2019-12-02 15:17:21 +00:00
Tom Byers
c3d055a140 Add templates vendor folder to gitignore & delete
It was added by mistake in this commit:

3c208a8b11
2019-12-02 15:03:56 +00:00