Commit Graph

10820 Commits

Author SHA1 Message Date
Tom Byers
1fea95fae4 Convert radios on link-service-to-org page (basic) 2020-12-02 16:00:33 +00:00
Tom Byers
eac4b97cc3 Convert radios on user page (basic)
Covers the page for both new and existing users.
2020-12-02 16:00:32 +00:00
Tom Byers
8fa385220b Convert radios on uploads preview page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
ae59f602db Convert radios on edit postage page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
641f03cb5b Convert radios on support triage page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
ca50cf63cb Convert radios on /support page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
0f269a1259 Convert radios on set inbound page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
d0b8610cd8 Convert radios on research consent (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
25b89dd30a Convert radios on data retention page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
b1d65f33c7 Convert radios on clear cache page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
e979aef43f Convert radios on provider ratio page (basic)
Also changes the CSS for the radios slider variant
component.
2020-12-02 16:00:32 +00:00
Tom Byers
45526598c6 Convert radios on edit org agreement page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
6aaa4d906b Convert radios on add nhs local org page (basic) 2020-12-02 16:00:32 +00:00
Tom Byers
52929d835d Convert radios for P.Admin email branding (basic) 2020-12-02 16:00:32 +00:00
Chris Hill-Scott
5652db86d1 Merge pull request #3725 from alphagov/limit-contact-list-jobs-to-retention
Limit jobs sent from contact list by data retention
2020-12-01 14:37:12 +00:00
Chris Hill-Scott
b579f68411 Limit jobs sent from contact list by data retention
On the uploads page we only show jobs which are within a service’s data
retention.

This commit does the same for when we’re listing the jobs for a contact
list. This matches the UI, which says a contact list has been ‘used
`<count_of_jobs>` in the last <data_retention> days’
2020-12-01 13:57:56 +00:00
Chris Hill-Scott
4b2744b684 Merge pull request #3440 from alphagov/show-jobs-on-contact-list
Show jobs grouped within the contact list they were sent from
2020-12-01 11:48:02 +00:00
Tom Byers
8ab756709a Merge pull request #3717 from alphagov/fix-nesting-in-content-page-sub-nav
Fix nesting in content page sub nav
2020-12-01 11:08:46 +00:00
Chris Hill-Scott
c898b68fa8 Add comment explaining mocking
> I'd find it useful to know mock_get_jobs mocks
> app.job_api_client.get_jobs here, perhaps through a comment. Reading
> it, I associated it with contact_list.get_jobs above.
2020-11-30 14:24:40 +00:00
Chris Hill-Scott
a9783f7907 Test for old but unused contact lists
Old contact lists can be:
- never used
- used, but so long ago we no longer have data about the jobs due to
  retention settings

We show different messages in each of these cases. This commit
parametrizes the tests to ensure that both cases are covered.

Also makes the job a bit older so that both cases are logically possible
with the test data.
2020-11-30 14:20:53 +00:00
Chris Hill-Scott
94c713e1b4 Make dates line up in
Having a contact list uploaded in 2020 but used in 2015 isn’t possible,
and so makes the tests confusing to read.
2020-11-30 14:14:26 +00:00
Chris Hill-Scott
45b60e9555 Show usage count on uploads page
Because we’re be grouping jobs under their parent contact lists it’s
good to have some information ‘scent’ to help people find their jobs,
ie by clicking into a contact list. It also lets you see which list have
been used more than others, maybe because the update hasn’t been sent
to that group of people yet.

The hint text under uploads always says when they were used. For contact
lists this is a bit more complicated, since they can:
- never have been used
- been used multiple times

This commit makes use of the new fields being returned by the API to say
determine when these messages are relevant. They also let us
differentiate between a contact list that’s never been used, and one
that has been used, but not recently enough to show any jobs against it.
2020-11-30 13:54:54 +00:00
Chris Hill-Scott
423875011c Show jobs on contact list
It’s a bit unintuitive that starting a job from a contact list makes a
copy of the file, which has no relationship to the list it was copied
from. This is more of an implementation detail, rather than something
that comes from people’s mental models of what is going on. Or at least
that’s what I hypothesise.

I think it’s clearer to show jobs that come from contact lists within
the lists that they were created from. By naming the jobs by template
this gives a clearer view of what messages have been sent to the group
over time.
2020-11-30 13:54:54 +00:00
Chris Hill-Scott
149456b73a Add some more macros for counting things 2020-11-30 13:54:53 +00:00
Chris Hill-Scott
8f5c07336d Add method to get jobs for a contact list
Because the API lets us query jobs by contact list now, let’s add the
model and client layer code that will let us display them in the admin
app.
2020-11-30 13:54:53 +00:00
Chris Hill-Scott
236ddf053d Make created_at a property of contact lists
The view layer shouldn’t be having to deal with converting dates as
strings. This is an artefact of how we send data from the API to the
admin app. The model layer should be responsible for turning JSON into
richer types, where it can.
2020-11-30 13:54:53 +00:00
Chris Hill-Scott
fc1ca3ab2f Refactor to make pagination reusable
The responses we get to paginated queries from the API are fairly
consistent, so we should be able to reuse the code that takes JSON
from the API and turns it into Python objects. This commits factors out
that code so that it is reusable (by inheriting from it).
2020-11-30 13:54:53 +00:00
Chris Hill-Scott
ee720662e1 Merge pull request #3722 from alphagov/remove-unused-component
Remove unused imports
2020-11-30 11:56:19 +00:00
Chris Hill-Scott
063a09aab8 Merge pull request #3723 from alphagov/bump-utils-43.5.2
Bump utils to 43.5.2
2020-11-30 11:56:10 +00:00
Chris Hill-Scott
6dc84194ff Bump utils to 43.5.2
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/808/files

Changes:
- https://github.com/alphagov/notifications-utils/compare/43.5.1...43.5.2
2020-11-30 10:52:23 +00:00
Rebecca Law
9463a94263 Remove the api_key component that was not being used on a few pages but imported. 2020-11-26 08:37:33 +00:00
Tom Byers
15ee8ad2c5 Merge pull request #3721 from alphagov/fix-user-permissions-for-manage-folder
Correct field_label attribute to 'users' on  manage folder page
2020-11-24 14:39:43 +00:00
Tom Byers
2f5f836dda Correct 'thing' to users on manage folder page
The checkboxes component that lets you choose
which users have permission to see the folder is
currently using the noun of 'folder' in the
summary it generates.

This is because this page users the
TemplateFolderForm class, which defaults the
permissions to 'folder'.

This updates the field_label attribute, used by
the code that generates the summary, to 'user' to
match the type of permission.
2020-11-24 14:22:08 +00:00
Chris Hill-Scott
6ebecec1f1 Merge pull request #3714 from alphagov/fix-focus-colour-edit-letter-links
Fix the focus colour on edit template links
2020-11-20 09:58:10 +00:00
Chris Hill-Scott
d1f5d51cc8 Merge pull request #3720 from alphagov/gamma
Remove line about beta from the roadmap
2020-11-20 09:58:04 +00:00
Chris Hill-Scott
806552ce1d Remove line about beta from the roadmap
We’re not in beta any more, and we don’t need to explain what beta means
any more.
2020-11-19 15:59:18 +00:00
Tom Byers
3f47ecd448 Merge pull request #3719 from alphagov/update-accessibility-statement
Update accessibility statement
2020-11-19 15:26:49 +00:00
karlchillmaid
83c3d31629 Remove bullets and update content 2020-11-19 15:05:35 +00:00
Tom Byers
1801793440 Update 'last reviewed' date 2020-11-19 14:44:19 +00:00
Tom Byers
ee03eb0767 Remove issue with blank alt text in email images
This is no longer happening with the NVDA screen
reader, which had the issue, when testing in
Outlook.

The hack added as a temporary solution has now
been removed. It went live on 19 November 2020 at
2.20pm.
2020-11-19 14:43:08 +00:00
Tom Byers
09fbd15b2f Merge pull request #3718 from alphagov/bump-utils
Bump utils to 43.5.1
2020-11-19 10:55:08 +00:00
Tom Byers
f64db263cd Bump utils to 43.5.1
Brings in the following changes:
- https://github.com/alphagov/notifications-utils/pull/800
  (Update colours used in email template to match
  design system)
- https://github.com/alphagov/notifications-utils/pull/801
  (Concern `BroadcastMessageTemplate` only with
  content, not XML)
- https://github.com/alphagov/notifications-utils/pull/802
  (Update pytest to 6.1.2)
- https://github.com/alphagov/notifications-utils/pull/798
  (Validate email message size is within SES
  limits)
- https://github.com/alphagov/notifications-utils/pull/804
  (Revert 798 validate email size)
- https://github.com/alphagov/notifications-utils/pull/805
  (Revert "Revert 798 validate email size")
- https://github.com/alphagov/notifications-utils/pull/806
  (Add service id to logs)
- https://github.com/alphagov/notifications-utils/pull/803
  (Take extended GSM characters into account in
  fragment count)
- https://github.com/alphagov/notifications-utils/pull/807
  (Remove alt text hack)

Of those, #801 is the only major version bump
(42.3.0 to 43.0.0).
2020-11-18 17:25:19 +00:00
Katie Smith
02ef7d5d7b Merge pull request #3716 from alphagov/pyup-scheduled-update-2020-11-16
Scheduled weekly dependency update for week 46
2020-11-18 15:00:46 +00:00
Katie Smith
6767f86085 Freeze requirements 2020-11-18 12:16:23 +00:00
Tom Byers
1941151513 Merge pull request #3715 from alphagov/add-govuk-radios
Add GOVUK radios [part 1]
2020-11-18 11:38:25 +00:00
Tom Byers
45488b21c0 Replicate styling in existing pages 2020-11-17 21:39:34 +00:00
Tom Byers
cd0b900c2f Nest child lists inside list items
It's not valid HTML for <ol> or <ul> tags to have
<ol> or <ul>'s as direct children.

See:
https://www.w3.org/TR/html52/grouping-content.html#the-ol-element
https://www.w3.org/TR/html52/grouping-content.html#the-ul-element
2020-11-17 21:36:40 +00:00
Tom Byers
ad3ff9e539 Merge pull request #3713 from alphagov/fix-fix-for-template-list-focus-styles
Fix how template list item focus extends
2020-11-17 11:23:43 +00:00
Katie Smith
b49b789b8c Merge pull request #3711 from alphagov/add-extended-character-set-content
Add content about the extended character set
2020-11-17 10:18:35 +00:00
pyup-bot
173ccac454 Update prometheus-client from 0.8.0 to 0.9.0 2020-11-16 13:54:03 +00:00