Commit Graph

10851 Commits

Author SHA1 Message Date
Chris Hill-Scott
d1ab09db05 Merge pull request #3739 from alphagov/refactor-user-live-services
Remove separate function for live service check
2020-12-14 15:22:10 +00:00
Katie Smith
f55c5a66d0 Merge pull request #3724 from alphagov/validate-service-name-length
Validate maximum service name length
2020-12-11 13:32:16 +00:00
Katie Smith
373365b2b0 Add class to letter specification links
To make them show up as non-visited links.
2020-12-11 11:33:34 +00:00
Katie Smith
57189f57e4 Add form validation for max service and org name
There was a recent error in the logs because a service tried to change
its name to one exceeding 255 characters (which is a limit on the
database field). We can easily catch these errors on the form, so that
the user doesn't see an error page.
2020-12-11 11:33:34 +00:00
Katie Smith
4e96f82c67 Fix client_request.post in test
The `post` method of the `client_request` fixture has an argument called
`_data`. There were a few places where we had used an argument of `data`
instead by mistake.
2020-12-11 11:33:34 +00:00
Tom Byers
0cae383294 Merge pull request #3730 from alphagov/add-govuk-radios-4
Add GOVUK radios [part 4]
2020-12-11 11:31:58 +00:00
Chris Hill-Scott
5027be31fc Remove separate function for live service check
When we get a support ticket we need to check whether a user has any
live services.

We have a method for this on the user model now, so we don’t need a
separate function in the feedback code.

It wasn’t very well tested so I’ve adapted the old tests from the
feedback view to work against the method on the user model too.
2020-12-10 15:43:45 +00:00
Chris Hill-Scott
f3bf8c88b0 Merge pull request #3726 from alphagov/uksv
Update link to reflect withdrawn guidance
2020-12-10 13:58:08 +00:00
Tom Byers
b1d0d216e0 Convert radios on add org page
Changes OrganisationCrownStatusForm.crown_status.

This also effects NewOrganisationForm, which
inherits from OrganisationCrownStatusForm.

Because of that this commit also updates the
template used for the edit org crown status page,
which uses NewOrganisationForm for its form.
2020-12-10 10:19:50 +00:00
Tom Byers
0cdbb850aa Convert radios in edit org type page (basic)
Changes the OrganisationTypeField class used by
OrganisationOrganisationTypeForm.organisation_type

OrganisationTypeField is also used by the forms in
/add-service:
- CreateServiceForm
- CreateNhsServiceForm

Because of that, this commit also includes changes
to the template for that route.

Note: this also moves where OrganisationTypeField
appears in app/main/forms.py so it can use
GovukRadiosField.
2020-12-10 10:19:49 +00:00
Tom Byers
5826dd9733 Merge pull request #3728 from alphagov/add-govuk-radios-3
Add GOVUK radios [part 3]
2020-12-09 15:35:51 +00:00
Tom Byers
58149ce34c Convert radios on SMS prefix page
Includes changing form.enabled to use
OnOffField, for consistency with other on/off
fields.

OnOffField's data is a boolean, not a string, so
some of the logic using it needed to be changed.
2020-12-09 15:03:43 +00:00
Tom Byers
1612812c5d Convert radios on disable platform admin
Uses ServiceOnOffSettingForm.enabled.
2020-12-09 15:03:43 +00:00
Tom Byers
2e98681a5e Convert radios on set international {sms|letters}
Uses ServiceOnOffSettingForm.enabled.
2020-12-09 15:03:43 +00:00
Tom Byers
645f7911ab Convert radios on set {email|sms|letters} pages
All use the ServiceSwitchChannelForm.enabled
field, inherited from ServiceOnOffSettingForm.
2020-12-09 15:03:43 +00:00
Tom Byers
c9151e2663 Convert radios on set-service-setting.html
Uses the ServiceOnOffSettingForm.enabled.

Effects the following routes:
- /services/<service_id>/service-settings/switch-live
- /services/<service_id>/service-settings/switch-count-as-live
- /services/<service_id>/service-settings/permissions/<permission>
- /services/<service_id>/service-settings/permissions/broadcast

Includes changes to make the GOVUK radios
component render the h1 in the page. This is done
so the legend doesn't just duplicate the h1 and
is recommended in the design system guidance for
the radios component for pages that just ask you
for one piece of information.

https://design-system.service.gov.uk/components/radios/#how-it-works
2020-12-09 15:03:43 +00:00
Tom Byers
b917fa3c74 Make OnOffField inherit from GovukRadiosField
Means that ServiceOnOffSettingForm.enabled ends up
using the GovukRadiosField methods for rendering.
2020-12-09 15:03:43 +00:00
Tom Byers
ca3d111f03 Merge pull request #3727 from alphagov/add-govuk-radios-2
Add GOVUK radios [part 2]
2020-12-09 14:50:06 +00:00
Tom Byers
2a817024a1 Merge pull request #3738 from alphagov/test-pre-compressed-asset
Generate asset to test CDN compression config
2020-12-09 11:26:32 +00:00
Tom Byers
80f34d8c3d Generate asset to test CDN compression config
Cloudfront, our CDN, sometimes decides not to gzip
assets. Because of this, we're going to gzip them
ourselves prior to upload instead.

This will involve:
1. adding gzipping to the make task that uploads
   them
2. turning compression off in Cloudfront

There is already a pull request up for number 1:

https://github.com/alphagov/notifications-admin/pull/3733

Because deploying all this will, at some point,
create a state where Cloudfront is set to compress
assets that are already compressed, we need to
test that it doesn't re-compress them.

This adds a frontend build task that generates a
test asset which is:
- a copy of app/static/stylesheets/main.css
- renamed to include a MD5 SHA of its contents
- already gzipped

Once deployed, the test will be to:
1. download the asset from the live environment
2. unzip it
3. diff it against app/static/stylesheets/main.css
2020-12-09 10:24:36 +00:00
Leo Hemsted
d5f54d2d78 Merge pull request #3735 from alphagov/show-allowed-broadcast-provider
show allowed broadcast provider
2020-12-09 09:52:22 +00:00
David McDonald
f270f5a90c Merge pull request #3737 from alphagov/use-cf7
Use cf7 commands for the cf CLI commands
2020-12-08 18:13:08 +00:00
David McDonald
36fa31563d Use cf7 commands for the cf CLI commands
As we want to upgrade from cf6 to cf7 CLI
2020-12-08 17:59:25 +00:00
Chris Hill-Scott
3d8324570f Merge pull request #3736 from alphagov/bump-utils-43.5.5
Bump utils to 43.5.5
2020-12-08 17:41:42 +00:00
Chris Hill-Scott
ddac1821da Bump utils to 43.5.5
Changes:
https://github.com/alphagov/notifications-utils/compare/43.5.2...43.5.5
2020-12-08 16:32:18 +00:00
Leo Hemsted
c805e7bd9c show allowed broadcast provider
in the "training"/"live" window
2020-12-04 10:52:09 +00:00
Tom Byers
677cf9fb7e Merge pull request #3732 from alphagov/fix-footer-link-styles
Put underlines back on footer links
2020-12-04 10:47:24 +00:00
Tom Byers
4b80364381 Put underlines back on footer links
Raised by the service assessment accessibility
review as a problem for the footer due to it
having a mix of text and links.

This also makes it match the latest GOVUK Frontend
style.
2020-12-04 09:28:14 +00:00
Chris Hill-Scott
819dab347a Merge pull request #3729 from alphagov/add-preconnect-header
Tell browser to connect to asset domain earlier
2020-12-03 12:04:08 +00:00
Chris Hill-Scott
bb34081599 Tell browser to connect to asset domain earlier
When a browser loads a Notify page it does the following:
- DNS and TLS handshake for notifications.service.gov.uk
- download some HTML
- sees that the HTML needs to load some CSS
- DNS and TLS handshake for static.notifications.service.gov.uk
- downloads the CSS

We can speed things up a bit in modern browsers by parallelizing this
process a bit. Modern browsers support some HTTP headers[1] that allow
them to connect to other origins sooner.

After this change the steps are:
- DNS and TLS handshake for notifications.service.gov.uk
- receive response headers and simultaneously:
  - download some HTML
  - DNS and TLS handshake for static.notifications.service.gov.uk
- sees that the HTML needs to load some CSS
- downloads the CSS

1. https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch
2020-12-03 11:01:05 +00:00
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
60f6c3e47f Update link to reflect withdrawn guidance
United Kingdom Security Vetting have their own organisation page on GOV.UK now
2020-12-02 10:38:19 +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