Katie Smith
7ae4017d50
Add audit event for inviting users to a service
2021-03-08 14:34:50 +00:00
Leo Hemsted
477129644d
fix syntax
2021-03-05 15:05:48 +00:00
Leo Hemsted
a8c63c0483
Merge pull request #3823 from alphagov/post-to-get-user-by-email
...
post to get user by email
2021-03-05 14:57:12 +00:00
Leo Hemsted
4a624ace32
post to get user by email
...
that way we won't store any PII in logs
2021-03-05 12:43:15 +00:00
Katie Smith
0561937c13
Add an audit event when a service's broadcast permissions change
...
This adds an audit event to the `events` table when the broadcast
permissions for a service (the service mode, channel or provider
restriction) changes.
2021-03-04 12:09:28 +00:00
Chris Hill-Scott
a27dbd24a7
Fix the ‘revoke’ links on the API keys page
...
They were missing the `govuk-link--destructive` class which turns them
red, consistent with other links we use for deleting or suspending
things.
2021-03-03 15:24:38 +00:00
Katie Smith
d563cc8432
Change wording for hidden text on job page
...
To use the singular for the total message box.
2021-02-26 14:55:14 +00:00
Tom Byers
7b67fc5f32
Fix aria on collapsed checkboxes fieldset
...
The fieldset that wraps the collapsible checkboxes
has an aria-describedby to make the summary its
accessible description.
This needs to point to the id of the summary but
the summary didn't have one.
These changes add the id and fix a fixture in the
tests for this module.
2021-02-25 14:00:16 +00:00
Katie Smith
82318387de
Add hidden text for pills on job page
...
The links in the blue boxes on the job page needed hidden text so that
they work out of context. This changes the text from "10 sending" to "10
sending text messages" (with the message type hidden text).
2021-02-24 14:36:21 +00:00
Katie Smith
6512b8fad3
Add descriptive links to API keys page
...
The links had no descriptive text, so all read 'Revoke'. This adds
hidden text specific to the item they relate to.
2021-02-24 14:36:21 +00:00
Katie Smith
e7d6a2ea0d
Add descriptive links to /service-settings/letter-contact-details
...
The links had no descriptive text, so all read 'Change'. This adds
hidden text specific to the item they relate to.
2021-02-24 14:36:21 +00:00
Katie Smith
4f7b08512a
Add descriptive links to /service-settings/sms-senders page
...
The links had no descriptive text, so all read 'Change'. This adds
hidden text specific to the item they relate to.
2021-02-24 14:36:21 +00:00
Katie Smith
0416b841b3
Add descriptive links to /service-settings/email-reply-to page
...
The links had no descriptive text, so all read 'Change'. This adds
hidden text specific to the item they relate to.
2021-02-24 14:36:21 +00:00
Katie Smith
1f9ea4a72f
Stop adding required attribute to WTForm fields
...
WTForms now renders the `required` attribute if there is a validator
such as `DataRequired`. This was flagged in an accessibility audit as
being unnecessary since it doesn't conform to the Design System
recommendations, which state that "all form fields are considered
mandatory when navigating a government service unless otherwise denoted
by the word ‘(optional)’."
This uses the approach here https://github.com/wtforms/wtforms/pull/361
to overwrite the `render_field` method.
2021-02-24 14:36:21 +00:00
Katie Smith
d7e56f6956
Stop checking for upload_document permission
...
All services have the `upload_document` permission now, so we don't need
to check for it on the email formatting page. This also deletes a test
which is not needed now.
2021-02-24 10:54:42 +00:00
Katie Smith
cc06d3bbd8
Merge pull request #3812 from alphagov/new-inset-text-macro
...
Use the GOVUK Frontend inset text component instead of <aside>
2021-02-24 10:51:35 +00:00
Leo Hemsted
a85e20ed3e
Merge pull request #3815 from alphagov/permissions-bug
...
allow caseworkers to view letter previews
2021-02-23 16:57:34 +00:00
Leo Hemsted
087f908968
allow caseworkers to view letter previews
...
they can already view notifications page, but the png and pdf letter
previews just 403 for them currently.
2021-02-23 16:08:03 +00:00
David McDonald
f8f3d44511
Add form to set service broadcast account type
...
Note, no option at the moment to set the service broadcast account type
as None, or back to without the broadcast permission. This has been done
for speed of development given the chance of us needing this is very
low. We can add it later if we need to.
2021-02-23 16:03:14 +00:00
David McDonald
6837b76d44
Remove existing broadcast permission form
...
This will be replaced by a new form that has it's own template, route
etc as it will vary quite a lot from the existing service permission
form.
2021-02-23 16:03:13 +00:00
David McDonald
67d07e4135
Remove option to put service live if broadcast service
...
Whether a service is live or not will be controlled from the broadcast
service settings page once a service is given the broadcast permission
2021-02-23 16:03:12 +00:00
Katie Smith
792860085e
Get rid of unecessary <div> and use the correct gutter class
...
* We don't need the inset text to be inside `<div>` tags because the
component adds its own
* Replaced `bottom-gutter` with `govuk-!-margin-bottom-6` since this
change will be needed across the app at some point.
2021-02-23 13:16:25 +00:00
Katie Smith
9ee2c3946a
Use inset-text component for template formatting partials
...
This adds spacing classes from the design system where necessary to keep
the spacing looking the same.
It also replaces the `<aside>` elements with a `<div>` on the edit
template pages. The accessibility audit noted that these were inside a
`<main>` element, so screen readers may not be able to navigate the
elements correctly.
2021-02-23 13:02:50 +00:00
Katie Smith
ac794dbc5b
Add Sass for GOV.UK Frontend inset-text
2021-02-23 13:02:50 +00:00
Tom Byers
df7a7dba79
Merge pull request #3807 from alphagov/remove-duplicate-id-from-scrollable-table
...
Remove id from table used for the row numbers
2021-02-19 14:31:34 +00:00
Chris Hill-Scott
f55a8bf4b8
Add library of test areas
...
This is a temporary addition so we can test out some functionality.
2021-02-19 11:35:51 +00:00
Tom Byers
4dcdb83e44
Remove id from table used for the row numbers
...
The fullscreenTable component has 2 layers to the
table you see onscreen:
1. the actual data table
2. a clone, with only the first column showing,
that sits on top so the row numbers stay in
place while you scroll
Table 1. has an id attribute on its caption. The
region wrapping it has an aria-describedby
attribute with the id as its value. This makes the
caption the description for the region.
This isn't needed for the clone and
makes the HTML invalid because ids should be
unique.
This removes the id from the cloned table.
2021-02-18 15:08:27 +00:00
Ben Thorner
52a5da4d17
Handle exception is org name already exists
...
Previously this would return a 500 error, as the 400 exception was
not handled from the API [1]. Note that:
- We tend to rely on exception messages to identify the error that
occurred [2][3], with services being a notable deviation [4]. I've
used the exception message approach, as this is more granular and
broadly consistent with the rest of the app.
- There is already code to cover this scenario when a user changes
the name of an existing organisation or service, but the mechanism
is different [5][6]. It makes sense to just get any error from the
call to try and create the organisation.
- The API mock is based on one for services [7], but I've chosen to
have it inline with the test, since we're unlikely to reuse it, and
it's clearer to have the test setup as part of the test.
[1]: 8f99da525d/app/organisation/rest.py (L34-L47)
[2]: 70b606a2d4/app/main/views/manage_users.py (L166)
[3]: 70b606a2d4/app/main/views/templates.py (L499)
[4]: 70b606a2d4/app/main/views/add_service.py (L30)
[5]: 70b606a2d4/app/main/views/service_settings.py (L102-L104)
[6]: 70b606a2d4/app/main/views/organisations.py (L264-L266)
[7]: 0abc143147/tests/conftest.py (L590-L606)
2021-02-17 09:34:30 +00:00
Pea Tyczynska
47f20ae438
Change content following content review
2021-02-16 15:20:15 +00:00
Pea Tyczynska
d7596f81fb
Add screen reader suffixes on all org settings
...
So screen reader users have consistent experience.
2021-02-16 14:46:14 +00:00
Pea Tyczynska
b2e4f76f94
Fix import order
2021-02-16 14:46:13 +00:00
Pea Tyczynska
eb9e6e2c71
Update organisation billing details
2021-02-16 14:46:13 +00:00
Pea Tyczynska
36c72bb4cc
View edit organisation billing details page
2021-02-16 14:46:13 +00:00
Pea Tyczynska
f4dc2a173e
Link to edit billing details page for organisation
2021-02-16 14:46:13 +00:00
Pea Tyczynska
8ea748f6e4
Update organisation notes
2021-02-16 14:46:12 +00:00
Pea Tyczynska
e090d97997
View edit organisation notes page
...
Also fix page title for edit service notes page.
2021-02-16 14:46:12 +00:00
Pea Tyczynska
56b777872e
Organisation billing details visible on organisation settings page
2021-02-16 14:46:12 +00:00
Pea Tyczynska
f0d94a009e
Organisation notes visible on organisation settings page
2021-02-16 14:46:11 +00:00
Chris Hill-Scott
276644f504
Reduce default broadcast expiry time to 4 hours
...
We don’t think we need to broadcast longer than this to validate that
the system is working.
2021-02-12 17:43:11 +00:00
Chris Hill-Scott
32e60ab507
Merge pull request #3799 from alphagov/alternative-product-image-desktop-only
...
Only show the alternative product image on desktop
2021-02-12 15:08:51 +00:00
Chris Hill-Scott
769b85ff25
Replace polygons module with the one from utils
...
We moved it in https://github.com/alphagov/notifications-utils/pull/818/files
2021-02-12 14:52:53 +00:00
Chris Hill-Scott
e193358f78
Only show the alternative product image on desktop
...
This matches what we do with the regular product image, to make sure the
text doesn’t overlap it.
2021-02-12 14:28:19 +00:00
Chris Hill-Scott
7463510378
Progressively enhance the proposition illustration
...
When users with Javascript enabled request it we can show a higher
quality SVG image which will look better in certain circumstances.
2021-02-11 17:03:13 +00:00
David McDonald
70b606a2d4
Merge pull request #3795 from alphagov/drop-go-live-link
...
Remove text about service is live or in trial mode
2021-02-11 12:01:35 +00:00
David McDonald
dc69fa5a90
Remove text about service is live or in trial mode
...
This is not relevant for broadcast services. This information is
given in the heading bar next to the service name. There is no process
to request to go live and it is not necessary to tell you again that the
service is live
2021-02-10 15:35:48 +00:00
Ben Thorner
0abc143147
Merge pull request #3790 from alphagov/show-from-reply-to
...
Fix not showing 'From' / 'Reply to' after sending
2021-02-10 14:40:54 +00:00
Ben Thorner
486393962e
Show 'From' / 'Reply to' on all sending screens
...
This makes the preview of the email / SMS to send consistent with
the final screen, which we previously changed to show the "reply
to" text irrespective of whether the user had selected anything.
2021-02-10 10:43:29 +00:00
Ben Thorner
933d5bf68e
Show 'From' / 'Reply To' if set for notification
...
Previously when a service had multiple "reply to" entries setup for
email or SMS, we would show the one that was selected on all screens
[1][2] except the final one, where the notification is actually sent.
This fixes that, with the caveat that it will also show for services
with only one "reply to" entry (see notes below) - we will look at
making this consistent on the previous screens in the next commit.
Here's a bit more detail on how this works:
- If a service has multiple "reply to" entries, the journey to send a
one-off message starts with a screen to select the "sender_id", which
is otherwise "None" [3].
- The "sender_id" is subsequently resolved to an actual email / phone
number by calling an API [4] and plucking it out of the response JSON.
- The email / phone number then get rendered as part of the preview
template [5][6].
- Unfortunately the "sender_id" is removed from the session by the time
we get to the "view_notification" view [7].
- However, we can get back the equivalent text from the notification
JSON, which is set by the API when the notification is created [8],
give or take a bit of validation code [9][10].
- But the "reply_to_text" field is also set by the API when the service
only has one "reply to" entry, so it will show then as well.
We could add look at the number of "reply to" entries for the service,
in order to consistently only show it when there is more the one. But
it seems more useful to show it on previous screens, since it provides
more information than is currently show (esp. for emails).
[1]: 93226ec5d6/app/main/views/send.py (L441-L442)
[2]: 93226ec5d6/app/main/views/send.py (L966-L967)
[3]: 93226ec5d6/app/main/views/send.py (L247)
[4]: 93226ec5d6/app/main/views/send.py (L1071-L1082)
[5]: 93226ec5d6/app/templates/views/notifications/notification.html (L80)
[6]: https://github.com/alphagov/notifications-utils/blob/master/notifications_utils/jinja_templates/sms_preview_template.jinja2
[7]: 93226ec5d6/app/main/views/send.py (L1059)
[8]: f8b4c9151c/app/service/send_notification.py (L87-L93)
[9]: f8b4c9151c/app/models.py (L653)
[10]: https://github.com/alphagov/notifications-utils/blob/master/notifications_utils/recipients.py#L482
2021-02-10 10:43:27 +00:00
Rebecca Law
f0ce2c6f5b
Update utils to version 43.8.
...
Invalid characters for the first line of a postal address now include < >
2021-02-09 14:07:01 +00:00
Katie Smith
6972b4b6b0
Merge pull request #3791 from alphagov/compare-broadcasts-no-updated-at
...
Allow broadcasts which have no created_at to be compared
2021-02-09 09:52:29 +00:00