Commit Graph

3690 Commits

Author SHA1 Message Date
Chris Hill-Scott
2ee5880e0c Change URL of notification page
This page is going to be used to show all notifications now, not just
ones sent as one-offs.
2017-06-21 15:09:40 +01:00
Leo Hemsted
250c64c4fb Merge pull request #1324 from alphagov/one-off
One off status page
2017-06-21 15:05:55 +01:00
Leo Hemsted
d47c2cdf9f remove dupe fixture 2017-06-20 10:51:25 +01:00
Leo Hemsted
580c225ca2 Change client_request so its kwargs look more like url_for 2017-06-19 12:31:14 +01:00
Chris Hill-Scott
ec57fdfc3b Merge pull request #1321 from alphagov/dar-logo
Add TFL Dial-A-Ride logo
2017-06-19 10:41:44 +01:00
Chris Hill-Scott
efe2dd86a7 Merge pull request #1322 from alphagov/55-56
55-56 for GOV.UK Registers
2017-06-19 10:38:05 +01:00
Pete Herlihy
6544c0833e Got to 57 before merged.... Horizon - DIT 2017-06-16 15:30:53 +01:00
Leo Hemsted
20bb34849d add tests for notification status page 2017-06-16 15:29:34 +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
Leo Hemsted
c5f92eabfb add add one-off notification status
completely mimicks the job status page, and as such, all the code and
templates have been taken from the job page. This page performs
exactly the same as the job page for now

* total, sending, delivered, failed blue boxes (though they'll just
  read 0/1 for now.
* download report button (same as with job download, except without job
  or row number in file)
* removed references to scheduled
* kept references to help (aka tour/tutorial) as that'll eventually
  change over from a job to a one-off too
2017-06-16 15:28:17 +01:00
kentsanggds
388bb312c8 Merge pull request #1323 from alphagov/ken-letter-recipients-ascii
Update requirements to get latest utils for address validation
2017-06-16 13:59:32 +01:00
Ken Tsang
54f65fa57b Added utf-8 support, refactored test 2017-06-16 13:58:56 +01:00
Ken Tsang
8061d3f29d Added assert to check row error message 2017-06-16 13:58:56 +01:00
Ken Tsang
8997c95512 Refactor non ascii test 2017-06-16 13:58:56 +01:00
Ken Tsang
11ce2bfa39 Updated test to include correct mocks 2017-06-16 13:58:56 +01:00
Ken Tsang
99ab7ddadd Updated test 2017-06-16 13:58:56 +01:00
Ken Tsang
7d8ccc4cb5 Update requirements to get latest utils 2017-06-16 13:58:56 +01:00
Ken Tsang
5f8266ede6 Update test 2017-06-16 13:58:29 +01:00
Ken Tsang
6e3bedb633 Refactored non ascii letter recipients test 2017-06-16 13:58:29 +01:00
Ken Tsang
c8f72bc513 Refactor to use address validation in utils 2017-06-16 13:58:29 +01:00
Ken Tsang
338df098a8 Add check for ascii only in recipients file 2017-06-16 13:58:29 +01:00
Pete Herlihy
a6fc184351 55-56 for GOV.UK Registers 2017-06-16 10:26:10 +01:00
Chris Hill-Scott
2ae80b5039 Add TFL Dial-A-Ride logo 2017-06-15 12:11:27 +01:00
Chris Hill-Scott
77235f50c9 Merge pull request #1320 from alphagov/jump-from-bottom-bug
Stop fixed position elements flying about
2017-06-15 11:51:27 +01:00
Chris Hill-Scott
84ee8b8327 Stop fixed position elements flying about
Normally, fixed position elements are positioned at `top: 0`.

The code that stops them from overlapping the footer does so by:
- setting the position to absolulte
- setting `top` to a calculated value (eg `1500px`) which makes it sit
  above the footer

The problem is caused because we’re animating `top`, so when scrolling
back up the page elements are getting animated from `1500px` to `0px`,
ie flying up from the bottom of the screen.
2017-06-15 11:47:32 +01:00
Chris Hill-Scott
12cfd45f60 Merge pull request #1319 from alphagov/bump-utils
Bump utils
2017-06-15 11:27:04 +01:00
Chris Hill-Scott
bde6226bb8 Merge pull request #1317 from alphagov/ease-in-fixed
Ease fixed-position elements into place
2017-06-15 11:26:58 +01:00
Chris Hill-Scott
cbeade0380 Ease fixed-position elements into place
The transition between something being static in the page and fixed to
the top of the viewport is a bit jarring.

This commit adds a bit of animation so that, as elements become fixed,
they appear to catch up with the scrolling of the page.
2017-06-15 11:14:30 +01:00
Chris Hill-Scott
09b1e2eb6a Bump utils
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/168/files
2017-06-15 11:12:26 +01:00
Chris Hill-Scott
4301e1265c Merge pull request #1318 from alphagov/disable-autofill-one-off
Disable autofill on one-off messages
2017-06-15 11:07:35 +01:00
Chris Hill-Scott
afaf41f7ae Disable autofill on one-off messages
Not good to be storing people’s phone numbers in browser autocomplete.

And increases the chance of accidentally sending the wrong thing to the
wrong person.
2017-06-15 11:06:14 +01:00
Chris Hill-Scott
de4b2e6413 Merge pull request #1316 from alphagov/outbound-body
Look at `body`, not `template` in outbound texts
2017-06-15 09:52:10 +01:00
Chris Hill-Scott
7e8471f21f Look at body, not template in outbound texts
As of this PR we don’t return the template content any more:
https://github.com/alphagov/notifications-api/pull/1015
2017-06-14 17:44:50 +01:00
Chris Hill-Scott
cebfa6cff6 Merge pull request #1315 from alphagov/feature
Adding first pass of the new features page
2017-06-14 17:03:56 +01:00
Chris Hill-Scott
f6f05a384d Content fixes 2017-06-14 17:01:16 +01:00
Chris Hill-Scott
86b4a27ca3 Fix the problems 2017-06-14 16:53:16 +01:00
Chris Hill-Scott
c60917d0e4 Merge pull request #1291 from alphagov/two-way
Add page to show two-way conversation
2017-06-14 16:42:46 +01:00
Chris Hill-Scott
a2e3dbaca5 Merge pull request #1314 from alphagov/remove-phone-numbers-urls
Stop putting phone numbers and email addresses in URLs
2017-06-14 16:42:37 +01:00
Pete Herlihy
b999378251 New features page 2017-06-14 16:41:52 +01:00
Chris Hill-Scott
7411256fc2 Add hidden form to re-post AJAX requests
Serializing the search box form is bad, because the AJAX thing submit
any changes that the user makes to the contents of the box. This results
in unexpected behaviour.
2017-06-14 16:25:20 +01:00
Pete Herlihy
314e3690ca Moving roadmap next to features in the footer 2017-06-14 16:18:36 +01:00
Pete Herlihy
7c5873c5b0 Adding features to the admin template
Bumped features and pricing to the banner for non logged in users too.
2017-06-14 16:14:16 +01:00
Pete Herlihy
b466b266df Adding test for routing to features page 2017-06-14 16:07:34 +01:00
Pete Herlihy
11215a0c16 Adding route for new features page 2017-06-14 16:05:20 +01:00
Chris Hill-Scott
fd3f6f920f Refactor conversation test to not re-request page
There’s no need to request the page once for each message on it. Quicker
to load the page once and then loop through the messages.

Still need this as an integration test because it’s testing the ordering
and threading of the message.
2017-06-14 15:43:42 +01:00
Chris Hill-Scott
eabd3f551a Add tests for getting a user’s phone number
Also makes the code a bit more specific by not squashing any exception,
only `HTTPError`s.
2017-06-14 15:37:57 +01:00
Chris Hill-Scott
681cea1d34 Make AJAX requests on activity page POST not GET
See parent commit for the reason we’re doing this.

Currently our AJAX requests only work as `GET` requests. So this commit
does a bit of work to make them work as `POST` requests. This is
optional behaviour, and will only happen when the element in the page
that should be updated with AJAX has the `data-form` attribute set. It
will take the form that has the corresponding `id`, serialise it, and
use that data as the body of the post request. If not form is specified
it will not do the serialisation, and submit as a `GET` request as
before.
2017-06-13 12:15:04 +01:00
Chris Hill-Scott
e65dcbe199 Make search by recipient form POST not GET
Phone numbers and email addresses are showing up in URLs where we let
users search for sent notifications by phone number or email address.

`GET` requests put the form data as a query string in the URL. This is
problematic when people are searching by a recipient’s phone number or
email address, because the URL may show up:
- in our server logs
- in our analytics
- in the user’s browser history

This is bad because these are all places where we don’t want
people’s personal information. It’s not too bad when this is happening
a handful of times. But it would be bad if we kept aggregating this
information because it would allow us to track users across services.

So, while it’s not especially RESTful, it’s better for the search form
to submit as a `POST` request. This way the phone number or email
address goes in the body of the request and does not show up in the URL.
2017-06-13 12:15:03 +01:00
Chris Hill-Scott
b7b4d38330 Merge pull request #1313 from alphagov/split-activity-tests
Split activity page tests into their own file
2017-06-13 11:47:00 +01:00
Chris Hill-Scott
ff83c7090f Split activity page tests into their own file
It’s not intuitive for these tests to be lumped in with the tests for
the job page.
2017-06-13 10:33:56 +01:00