Commit Graph

7771 Commits

Author SHA1 Message Date
Tom Byers
bb16626209 Split module out into objects for each component
Is clearer than just having one large hierarchical
object and makes the relationships between the
module and its components clearer.
2019-05-10 14:20:14 +01:00
Tom Byers
7328649537 Combine 'Change' and 'Done' buttons into one
Includes addition of classes by JS to ensure CSS
selectors don't have to reference the data
attributes.
2019-05-10 14:16:03 +01:00
Chris Hill-Scott
923ac7190c Add a hint when no team members are selected
This helps clarify that you will still be able to see the folder.
Follows the phrasing used for the "No folders…" message.
2019-05-09 13:43:04 +01:00
Tom Byers
1ffa8c8915 Only show the folder icon if fields are folders 2019-05-09 11:25:28 +01:00
Chris Hill-Scott
3dc2130926 Align baseline of summary text with button text 2019-05-09 10:30:46 +01:00
Chris Hill-Scott
89478ac2ca Use larger folder icon 2019-05-09 10:27:14 +01:00
Chris Hill-Scott
f274759cd8 Add larger version of black folder icon
This is for use in the folder permissions UI. It’s designed to be sized
at the same width as a GOV.UK style checkbox. The CSS to render it is
something like:

```css
background-image: file-url('folder-black.svg');
background-repeat: no-repeat;
background-size: 39px auto;
background-position: 0px 4px;
```
2019-05-09 10:21:30 +01:00
Tom Byers
db12ec3a5c Make buttons work outside of context
This is important for users who find buttons via
interfaces that present them out of the context of
the page, like screenreaders.
2019-05-08 17:16:08 +01:00
Tom Byers
42a9a0cf23 Make selection summary a live region
Live regions need to be in the original HTML of
the page to work. We were generating the summary
in JS.

This changes the JS to only generate the contents
of the summary so changes to its contents are
announces by the existing live-region.
2019-05-08 17:16:06 +01:00
Tom Byers
089ebf2c7a Add tests for collapsible checkboxes 2019-05-08 17:08:20 +01:00
Tom Byers
90ad8b4ed0 Add helpers for JS tests
To help with asserting some things which were
repeated in the tests.
2019-05-08 17:08:20 +01:00
Tom Byers
33d074c00a Allow nested checkboxes to be collapsible
Expands the API of the macro to allow nested
checkboxes to have a summary tracking the current
selection, the fieldset to expand/collapse and
buttons to be added to allow jumping between
states.

Includes making 'Done' button inline on mobile.
Helps differentiate it form the form submit.
2019-05-08 17:08:16 +01:00
Tom Byers
20a94910cb Give permissions form legend heading styles
Also includes putting the text at the foot of the
checkboxes into a hint below the legend.
2019-05-08 11:35:58 +01:00
Chris Hill-Scott
80dec99a56 Merge pull request #2946 from alphagov/use-service-organisation-for-service-agreement
Look at service’s organisation on agreement page
2019-05-07 16:10:18 +01:00
Katie Smith
9199db3400 Merge pull request #2936 from alphagov/show-sms-provider-traffic
Show monthly usage by SMS provider on Providers page
2019-05-07 10:15:15 +01:00
Katie Smith
259a82e066 Update for new format of data returned from api
- API will now send through `created_by_name` instead of `created_by`.
- API will always send through `current_month_billable_sms` but this can
now be `0` instead of `None`.
2019-05-07 08:30:34 +01:00
Katie Smith
a74da6d14e Show monthly usage by SMS provider on Providers page
This adds a '% monthly traffic' column to the SMS table on the Providers page
to let us see how much traffic is being sent to each SMS provider.
2019-05-07 08:30:34 +01:00
Pea (Malgorzata Tyczynska)
a7d8918ee0 Merge pull request #2951 from alphagov/performance-platform-xlsx
Provide Performance Platform report as Excel file
2019-05-03 15:59:06 +01:00
Pea (Malgorzata Tyczynska)
9025975d92 Merge pull request #2952 from alphagov/fix-live-services-csv
Add organisation type to live services csv report
2019-05-03 15:48:50 +01:00
Chris Hill-Scott
3c38a7be05 Provide Performance Platform report as Excel file
This is the format we need to upload it in, so this means not having to
manually re-save it as Excel.
2019-05-03 15:40:53 +01:00
Chris Hill-Scott
79b3e90a18 Merge pull request #2949 from alphagov/fix-placeholder-order-in-tour
Fix order of placeholders in the tour
2019-05-03 15:07:03 +01:00
Pea Tyczynska
a53849013a Add organisation type to live services csv report 2019-05-03 14:38:33 +01:00
Chris Hill-Scott
c768b6c8f3 Merge pull request #2950 from alphagov/fix-add-service-unknown-org-type
Fix adding a service when organisation is unknown
2019-05-03 14:31:29 +01:00
Chris Hill-Scott
ac46be5606 Fix adding a service when organisation is unknown
An ‘unknown’ organisation can either be:
- one where we know it exists but don’t know much about it (in which
  case the API returns some JSON with the info we do know)
- one we’ve never come across (in which case the API will return `None`)

This commit fixes a bug where we were trying to access the organisation
type in the latter case.
2019-05-03 13:40:22 +01:00
Chris Hill-Scott
34171f3038 Fix order of placeholders in the tour
Doing a lookup with `step_index - 1` means that on step `0` we were
looking up `placeholders[-1]`, ie we were making people fill in the last
placeholder first.

Fixing this reintroduces the bug fixed by this pull request:
https://github.com/alphagov/notifications-admin/pull/2551

So this commit also re-fixes that bug but in a different way.
2019-05-03 13:29:23 +01:00
Chris Hill-Scott
0508d4a1fc Merge pull request #2948 from alphagov/fix-permissions-check-uuid-param
Fix permissions check when service ID is a UUID
2019-05-03 10:26:15 +01:00
Chris Hill-Scott
b7e9c320f8 Fix permissions check when service ID is a UUID
If you define a route with the service ID as a typed parameter, ie
```
@main.route('/services/<uuid:service_id>/agreement')
```

then `type(service_id)` returns `<class 'uuid.UUID'>`.

This is a problem when the permissions dictionary stores service IDs as
strings, because trying to look up a user’s permissions with the UUID
fails silently (that key isn’t in the dictionary).

This commit makes sure we always cast the service ID to a string before
using it to check permissions.
2019-05-03 10:06:51 +01:00
Chris Hill-Scott
7c72b3eace Merge pull request #2947 from alphagov/update-trial-mode-links
Update links to trial mode guidance
2019-05-03 09:40:19 +01:00
Chris Hill-Scott
f1d8366a14 Update links to trial mode guidance
These links used to be on the ‘using Notify’ page which has been broken
up. So there’s now a standalone page about trial mode that we can link
to.
2019-05-03 09:26:32 +01:00
Chris Hill-Scott
f33bd6a67e Merge pull request #2945 from alphagov/fix-live-services-csv
Allow for empty live_date field in live services csv reports
2019-05-02 09:31:21 +01:00
Chris Hill-Scott
4cb08eb8ff Look at service’s organisation on agreement page
Usually the service’s organisation and the user’s current organisation
will be the same. But this won’t be the case when:
- someone with a non-government email address is looking at the page
- someone from our team, as a platform admin user, is looking at the
  page (it will show Cabinet Office instead)

This commit fixes these problems by explicitly looking at the service’s
organisation. We couldn’t do this previously because when this page
wasn’t service-specific `current_service` was not guaranteed to be set.
2019-05-02 09:21:44 +01:00
Pea Tyczynska
0755e81c09 Allow for empty live_date field in live services csv reports
Earlier the report broke if there were services with an empty
live date
2019-05-01 18:30:01 +01:00
Chris Hill-Scott
8c1f2298a8 Merge pull request #2943 from alphagov/service-agreement
Add service-specific versions of agreement page
2019-05-01 17:07:45 +01:00
Pea (Malgorzata Tyczynska)
338de3dd67 Merge pull request #2934 from alphagov/live-services-csv
Add Live services and Performance platform csv reports
2019-05-01 16:20:53 +01:00
Pea Tyczynska
46e8a52f2b Add performance platform csv report and format live dates
Drop redundant Response wrapper
2019-05-01 16:00:09 +01:00
Pea Tyczynska
128bbd0d5f Add yearly notifications sent stats to live services report
Update live_services_csv so it works with new endpoint
2019-05-01 16:00:01 +01:00
Pea Tyczynska
b0a8c5edf6 Get live services csv report 2019-05-01 15:59:50 +01:00
Rebecca Law
acd564873a Say services in URL path
It’s what we do everywhere else…

Co-Authored-By: quis <me@quis.cc>
2019-05-01 15:41:43 +01:00
Chris Hill-Scott
041c7f8967 Link request to go live to service agreement page
To make it easier for users to go back and forth.
2019-05-01 15:16:15 +01:00
Chris Hill-Scott
a1e562dea6 Merge pull request #2941 from alphagov/real-breadcrumb
Use proper icon for breadcrumb
2019-05-01 15:07:55 +01:00
Chris Hill-Scott
36800ed84c Merge pull request #2942 from alphagov/fix-heading-size-new-templates-page
Fix heading size on empty templates page
2019-05-01 15:06:59 +01:00
Chris Hill-Scott
69b1ecb57c Add folder-style navigation even if you don’t have folders 2019-05-01 11:17:59 +01:00
Chris Hill-Scott
d0d6421a91 Fix heading size on empty templates page
This is a special case which I missed when doing the rationalisation in
https://github.com/alphagov/notifications-admin/pull/2937
2019-05-01 11:17:59 +01:00
Chris Hill-Scott
35bf42b024 Add service-specific versions of agreement page
Our usability testing found that jumping out of the service when going
to download the agreement made it difficult for people to find their way
back to the ‘Request to go live’ page.

This commit adds a duplicate, service-specific versions of these pages
which have the same content but:
- keep the service navigation
- have a link back to the ‘Request to go live’ page
2019-05-01 08:51:34 +01:00
Chris Hill-Scott
734666ee53 Refactor agreement pages into includes
So we can re-use the same content in multiple places.
2019-05-01 08:51:34 +01:00
Chris Hill-Scott
dbf8b22d3c Organise agreement pages into a folder
This keeps them all in one place so they’re easier to work with.
2019-05-01 08:33:53 +01:00
Chris Hill-Scott
74638f4cd0 Use proper icon for breadcrumb
Uses the asset from the GOV.UK Frontend Toolkit.
2019-04-30 16:03:27 +01:00
Chris Hill-Scott
c8fe1fc715 Merge pull request #2937 from alphagov/heading-rationalisation
Rationalise heading sizes and ‘Back’ links
2019-04-30 15:51:50 +01:00
Chris Hill-Scott
8ad58d641c Fix vertical position of ‘Manage’ link
This doesn’t line up now that the heading sizes have changed.
2019-04-30 15:30:31 +01:00
Chris Hill-Scott
d9da63401f Normalise heading sizes
Since we added template folders the templates page has had a ‘medium’
sized heading, where other pages have stuck with a ‘large’ size.

This commit rationalises the decision around which pages have which
heading size:
- ‘navigation’ pages (eg templates, team members, email reply to
  addresses) have medium sized headings
- transactional pages (ie ones which have a green button) keep the
  larger heading size
2019-04-30 15:30:31 +01:00