Commit Graph

7645 Commits

Author SHA1 Message Date
Chris Hill-Scott
d50eb11c7a Add email reply to address to go live ticket
It’s one of the things we check when someone makes a request to go live,
and putting it in the ticket means we don’t have to take the extra step
of clicking into the settings.

Also added some line breaks to chunk things up a bit more clearly.
2020-12-22 14:02:33 +00:00
Tom Byers
5a44cae266 Merge pull request #3734 from alphagov/give-cookie-banner-accessible-name
Give the cookie banner an accessible name
2020-12-22 11:29:53 +00:00
Tom Byers
e80b02d2c9 Merge pull request #3742 from alphagov/fix-for-file-input-in-safari
Fix for file input bug in safari
2020-12-17 14:24:25 +00:00
Tom Byers
55a4ca6579 Remove set-to-string conversion from upload code
Also changes the allowed_spreadsheet_file_extensions
variable to allowed_file_extensions for
consistency.
2020-12-17 13:04:27 +00:00
Tom Byers
ea3d61e6b9 Use format_list_items in file_upload component 2020-12-17 11:32:02 +00:00
Tom Byers
9716d5dbba Add format_list_items template filter 2020-12-17 11:32:00 +00:00
Tom Byers
97bc2817bc Merge pull request #3731 from alphagov/add-govuk-radios-5
Add GOVUK radios [part 5]
2020-12-16 14:48:49 +00:00
Tom Byers
51cc2a5296 Set accepted files for branding upload 2020-12-16 14:48:10 +00:00
Tom Byers
1096d1f707 Set accepted files for contact list upload 2020-12-16 14:48:10 +00:00
Tom Byers
fb1ac8bc42 Set accepted files for letter upload 2020-12-16 14:48:10 +00:00
Tom Byers
b8f8d743d5 Set accepted files for job spreadsheet upload 2020-12-16 14:48:10 +00:00
Tom Byers
e9722256ea Rename Spreadsheet.allowed_file_extensions
We will use this list in various views, to send
them through to the file_upload component.

These changes make it:
- into a Set so it can't be altered
- uppercase to show it is a constant
2020-12-16 14:48:10 +00:00
Tom Byers
eaa1a67d76 Add allowed_file_extensions arg to file_upload
Safari has a bug where it stops input[type=file]
elements working if they don't specify the types
of file to accept (via the `accept` attribute).

It seems to just effect certain versions of Mojave
but completely blocks this action so worth fixing.

This adds a 'allowed_file_extensions' keyword
argument to the file_upload component to let you
specify a value to be passed to `accept`.

This was spotted on x-gov Slack:

https://ukgovernmentdigital.slack.com/archives/C06GCJW7R/p1607952390112800

...and StackOverflow:

https://stackoverflow.com/q/64843459/679924
2020-12-16 14:48:10 +00:00
Tom Byers
ea98681b24 Update liveSearch selector in set email|letter
Changes the selector the live search in the set
email and letter branding pages in service
settings and organisation settings. The current
one targeted the old radios HTML whereas this
version targets the same for the GOVUK Frontend
radios.
2020-12-15 12:08:09 +00:00
Tom Byers
d620d9ea08 Hide legend on SetEmailBranding.branding_style
Effects all routes that use that form, or
SetLetterBranding, which inherits from it:
- /organisations/<service_id>/settings/set-letter-branding
- /organisations/<service_id>/settings/set-email-branding
- /<service_id>/service-settings/set-letter-branding
- /<service_id>/service-settings/set-email-branding
2020-12-15 12:08:09 +00:00
Tom Byers
4e47b62aa3 Update previewPane JS and JS radios test helpers
The previewPane JS used selectors that targeted
the old form of radios HTML.

The JS tests also contained selectors like this
and fragments of HTML, used for fixtures, modelled
on the old radios HTML.
2020-12-15 12:08:09 +00:00
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
Tom Byers
4fc6bc10c7 Convert radios on set letter branding page 2020-12-11 13:58:40 +00:00
Tom Byers
22e6421799 Convert radios on email branding page 2020-12-11 13:58:40 +00:00
Tom Byers
8e3cddd66d Convert radios on set letter brand page 2020-12-11 13:58:40 +00:00
Tom Byers
e8a74b7ed1 Convert radios on set email branding page
Changes SetEmailBranding.branding_style to
GovukRadiosFieldWithNoneOption.
2020-12-11 13:58:40 +00:00
Tom Byers
d911c1a707 Add GovukRadiosFieldWithNoneOption 2020-12-11 13:58:40 +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
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
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
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
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
0ec53be2da Give the cookie banner an accessible name
Our cookie banner has an accessible description
but no accessible name. It needs to have an
accessible name to distinguish it from other
elements on the page with role=region.

There's some advice in the WCAG guidance that
explains this more:

https://www.w3.org/TR/WCAG20-TECHS/ARIA11.html

This issue was raised in the accessibility review
done as part of our service assessment.

These changes borrow the approach from www.gov.uk of
moving to a label and losing the accessible
description. It also uses the 'cookie banner'
label for consistency with www.gov.uk.
2020-12-04 10:41:48 +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
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