Commit Graph

2991 Commits

Author SHA1 Message Date
Chris Hill-Scott
3bbd5381c6 Revert "Revert "Restyle template statistics and received text messages"" 2020-02-18 16:16:51 +00:00
Pea M. Tyczynska
a8ca8c1835 Merge pull request #3311 from alphagov/revert-3295-restyle-template-stats
Revert "Restyle template statistics and received text messages"
2020-02-18 15:04:59 +00:00
Pea M. Tyczynska
e97f9f7fa4 Merge pull request #3310 from alphagov/fix-reset-password
Fix reset password flow
2020-02-18 15:03:11 +00:00
Chris Hill-Scott
6bdd776780 Revert "Restyle template statistics and received text messages" 2020-02-18 14:58:33 +00:00
Pea Tyczynska
3a93fe6892 Fix reset password flow
It was broken because of mismatch in update password argument
2020-02-18 14:50:27 +00:00
Chris Hill-Scott
a86f0a6efc Merge pull request #3295 from alphagov/restyle-template-stats
Restyle template statistics and received text messages
2020-02-18 14:30:06 +00:00
Pete Herlihy
f9e2e49dad Updating the page title attribute on text message conversations
Changing to "Received text message"
2020-02-18 13:29:18 +00:00
Pea Tyczynska
e413798b4d Change email_access_validated_at formatting to be more in line with other dates on User model 2020-02-17 11:34:25 +00:00
Pea Tyczynska
7d460fe483 Move date-checking logic to utils and unit test it 2020-02-17 11:34:25 +00:00
Pea Tyczynska
caf77341b3 Send 2fa email and move user to waiting page when they need to re-validate email access 2020-02-17 11:34:24 +00:00
Chris Hill-Scott
42373e3615 Always use smaller font size for totals
This means the font size matches the counts on the usage section, and on
the new received text messages banner.
2020-02-17 10:31:59 +00:00
Chris Hill-Scott
b65b417a08 Restyle inbound text messages
This commit adds a new kind of banner to the dashboard for summarising
things you might need to action.

This way we’ll be able to have multiple instances of this banner on the
same page without it looking too intense.

I never really liked the big blue banner for inbound text messages
because it became the most prominent thing on the page. It was an
interim solution that let us ship the feature until we had something
better.
2020-02-17 10:31:59 +00:00
Katie Smith
e53a97423b Update radio-select to use govuk-frontend buttons 2020-02-17 08:05:05 +00:00
Katie Smith
0d0b71af63 Update buttons on api key pages to govuk-frontend buttons 2020-02-17 08:05:05 +00:00
Katie Smith
e53c5e17b3 Update file upload component to use govuk-frontend buttons 2020-02-17 08:05:05 +00:00
Katie Smith
2cbfaf1b6f Update the buttons on template folder form 2020-02-17 08:05:05 +00:00
Katie Smith
583a925e89 Add buttons for list entries
As part of updating the stylesheet, moved `.button-secondary` to the
global stylesheet, since this is not related to list entries but instead
affects all buttons with that class (this class wlil be removed once all
the buttons are using the new macro).
2020-02-17 08:05:05 +00:00
Katie Smith
4e42fa6f5d Update buttons for collapsible checkboxes
We use collapsible checkboxes when setting which folders team members
can see (on the manage folder page and on the edit team member page).
2020-02-17 08:05:05 +00:00
Katie Smith
ba8ac41953 Update Javascript tests
This only updates the JavaScript tests where we don't need to make changes to
the actual JavaScript too.
2020-02-17 08:05:05 +00:00
Katie Smith
dca6d1690f Use govuk-button in page footer component 2020-02-17 08:05:05 +00:00
Katie Smith
ac41a22329 Use new button in banner macro
This means we can delete a class from the banner scss.
2020-02-17 08:05:05 +00:00
Katie Smith
f3bb93f460 Replace straightforward buttons and links styled like buttons
This replaces the buttons that aren't part of a macro and that we don't
need to write additional styles for with their govuk-frontend equivalent.

There were some links that were styled to look like buttons, so these
have also been replaced with the new govuk-frontend macro.

There was one button on the `choose-account.html` template that was in a
section of code that was never reached - this has been deleted.
2020-02-17 08:05:05 +00:00
Katie Smith
9c927f950c Merge pull request #3296 from alphagov/add-letter-specification-guidance
Add letter specification guidance
2020-02-13 16:21:45 +00:00
Katie Smith
f425fe75cf Update link in error messages for uploaded letters 2020-02-13 16:14:11 +00:00
Chris Hill-Scott
4f32258a7b Merge pull request #3293 from alphagov/cache-returned-letter-summary
Cache returned letter summary in Redis
2020-02-12 13:48:51 +00:00
karlchillmaid
38fd842d33 Merge pull request #3213 from alphagov/add-guidance-content
Add first iteration of guidance content, including updating navigation menus and footer.
2020-02-12 11:43:07 +00:00
Chris Hill-Scott
af8395956e Cache returned letter summary in Redis
We’re going to start using the returned letters summary to show some
info on the dashboard.

This means we will be accessing it more often than it changes. And we
know exactly when it changes because it’s us manually submitting the
references we get from DVLA.

This makes it a good candidate for being cached, and Redis is where we
cache stuff that we’d otherwise go to the API for.
2020-02-12 11:42:06 +00:00
Chris Hill-Scott
6b703614b9 Merge pull request #3280 from alphagov/swap-nav-order-org-users
Swap order of usage and team members in navigation when organisation users are looking at a service
2020-02-11 11:21:14 +00:00
Chris Hill-Scott
8a4bf1d07e Make test more robust
Now tests:
- that the user doesn’t have the usage menu item when they’re not a
  member of the organisation (i.e. the counterfactual)
- that the user still gets a 403 when they try to view the usage page if
  they’re not a member of the organisation
2020-02-11 11:11:18 +00:00
Rebecca Law
94c9886a58 Merge pull request #3288 from alphagov/delete-template-dialog
Delete template dialog
2020-02-06 10:58:43 +00:00
Rebecca Law
b242467d77 Change the content for the delete template confirmation dialog.
As per https://www.pivotaltracker.com/story/show/170796514 we want to make the delete template confirmation dialog box more consistent and clear.
The API has been updated with a new endpoint that only returns the last-used date, this date is more accurate since it goes to the ft_notification_status table, if the notification table is empty.
2020-02-06 10:16:00 +00:00
Leo Hemsted
636a702d19 Merge pull request #3286 from alphagov/remove-api-keys
cleanup
2020-02-05 10:11:47 +00:00
Pea M. Tyczynska
b5723a1aef Merge pull request #3285 from alphagov/uploads-fix-letter-link
Fix bug where job url type was constructed for letter on uploads page
2020-02-04 16:26:49 +00:00
Rebecca Law
143564c7f0 Update message seen when deleting a template. 2020-02-04 16:00:51 +00:00
Leo Hemsted
5b868ff268 remove api keys from codebase
these are just used for tests so don't need to look like real api keys.
2020-02-04 14:44:19 +00:00
Pea Tyczynska
46292949cd Fix bug where job url type was constructed for letter on uploads page 2020-02-04 14:19:07 +00:00
Rebecca Law
8a19d9496a Check if user is authenticated before signing out, this will prevent a 500 if the user is an AnonymousUser.
I ended up creating a new test user and logged_in_client, which isn't really great. But I tried adding a current_session_id to the active user in the test, but that broke all other tests.
I tried setting current_session_id in all the users being tested but that didn't work either. I'd like to come back to fixing the tests and reducing the number of conftest methods in another PR. For now this fixes the bug.
2020-02-04 12:16:58 +00:00
Chris Hill-Scott
cceb731596 Rename test to be a more explicit about what it’s testing
It’s not just that they’re an org user, it’s that they’re also a service user. And the usage page is the special case.
2020-02-03 16:28:47 +00:00
Chris Hill-Scott
b7b9e9747b Add test for org user who is also a service user
Org users should always be able to see the usage page, even if they
don’t have the `manage_service` permission for the service.
2020-02-03 16:05:46 +00:00
Rebecca Law
0e1ee504ac - Add unit test for when case when the cookie doesn't match the db.
- Move code into User.signout method to further encapsulate the code.
2020-02-03 15:08:55 +00:00
Rebecca Law
937c9f2adc Ensure that the session is logged out server side, not just client side.
Anytime a user clicks "sign out" we should be signing them out server side as well. This can be accomplished by setting the Users.current_session_id = null.
I found that the method User.logged_in_elsewhere doesn't need to check if the current_session_id is None. The current_session_ids in the cookie and db (redis or postgres) then the user should be forced to log in again.
2020-02-03 12:24:02 +00:00
Chris Hill-Scott
a35931a33a Swap order of usage and team members for org users
Org users, when looking at the page for their org, see:
> Usage
> Team members

When they click into a service it switches to:
> Team members
> Usage

This is jarring. It should stay consistent. I think it that _Usage_ then
_Team members_ is the natural way of ordering the navigation at the
organisation level, so let’s follow that through to the service level.

This does mean that if someone is a member of both an organisation and a
service that the nav will jump (because it’ll switch to the existing,
service-level order of _Team members_ then _Usage_) but it’s going to
jump anyway because you get all the extra navigation items when you’re a
member of a service.
2020-02-03 11:39:58 +00:00
Leo Hemsted
01ba256ef9 bump utils to fix datetime formatting jinja bug 2020-01-28 10:32:21 +00:00
Leo Hemsted
4e1fcfbff1 handle invalid upload errors correctly
previously it assumed that invalid_pages would always exist, however it
might be `None` if the error isn't on a specific page. Errors on
specific pages include a page not being A4 or content being outside the
boundary. Errors not on specific pages include the file not being a pdf,
or containing too many pages
2020-01-27 15:11:37 +00:00
Chris Hill-Scott
d29f23bfc8 Add left hand navigation
Due to the way the navigation dictionaries are built this mean being
less smart about the view method for the guidance pages.
2020-01-24 16:25:32 +00:00
Chris Hill-Scott
da2bc29b40 Merge pull request #3263 from alphagov/fix-new-jobs-showing-as-deleted
Use time to determine why notifications don’t exist
2020-01-24 15:27:29 +00:00
Pea M. Tyczynska
ba6b412bca Merge pull request #3268 from alphagov/proper-form-for-letter-branding
Parametrise branding request flow so it serves both email and letter branding
2020-01-23 16:50:41 +00:00
Pea Tyczynska
a578ec23a3 Redirect to template after succesful branding request
if user entered branding request flow from a template.
2020-01-23 16:35:15 +00:00
Pea M. Tyczynska
fdff9d3b83 Ensure gov.uk branding only available for emails and not for letters
Also align and statements
2020-01-23 16:34:58 +00:00
Chris Hill-Scott
3b108e8c93 Add comment clarifying timings in test case 2020-01-23 16:32:08 +00:00