Commit Graph

2426 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Chris Hill-Scott
74fb30ce5f Add GOV.UK Design System style back links
The Design System has standardised on back links being at the top of the
page, decorated with a small text-coloured arrow.

I think this makes more sense than having them at the bottom, because it
suggests, in some way, being able to go back before commiting to any of
the forms on the page. Whereas the things at the bottom of the page
should be performing actions on what’s in the page.

The reason for making this change now is that it de-clutters the area
around the green buttons. This was presenting a design challenge where
multiple levels of interaction were happening in the same form. Moving
these back links to the top of the page should mean that, in these
complicated forms, there’s one fewer thing to compete for the user’s
attention.

I’ve componentised this into a `page_header` macro so that the change is
easier to roll out and maintain.
2019-04-30 15:29:39 +01:00
Chris Hill-Scott
3cfe4740fb Make ‘Add a new service’ a button
This, along with putting it in a sticky footer, makes it consistent with
the ‘Add template’ and ‘Invite team member’ buttons.
2019-04-30 15:08:40 +01:00
Chris Hill-Scott
9e238a4f87 Merge pull request #2923 from alphagov/dont-ask-org-type
Don’t ask for organisation type when we know it
2019-04-30 11:22:21 +01:00
Chris Hill-Scott
0f2f9fa946 Merge pull request #2931 from alphagov/rationalise-settings
Allow more space for values in settings tables
2019-04-29 16:58:24 +01:00
Chris Hill-Scott
0512f40ad3 Fix misleading class name
Not sure where this came from, but visually our tables have always
aligned text to the left by default.
2019-04-29 16:36:47 +01:00
Katie Smith
d689b031a2 Allow non-gov email addresses to be changed to gov email addresses
When a user's email address is updated, we not allowing it to be changed
to a non-government email address. We now allow a non-gov email address
to be changed to another non-gov email address. Government email
addresses still cannot be changed to non-government email addresses.

Also fixes the link in the error message on the ChangeEmailAddress form -
this was being escaped before.
2019-04-25 10:36:04 +01:00
Chris Hill-Scott
da19c0b4ad Remove bullets from lists in tables
I think this is something we inherited from the Digital Marketplace
code. We only use this for organisation settings are the moment, but
the list markers are redundant because each item will never wrap onto a
new line; it will truncate instead. Still keeps a little sliver of
spacing just so it doesn’t look like a paragraph.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
d3caaf94b1 Make archive/suspend links not buttons
They don’t immediately perform an action, so semantically they are
links, not buttons.
2019-04-24 16:11:32 +01:00
Tom Byers
2eab320fe3 Merge pull request #2912 from alphagov/add-jest-framework
Add Jest framework for testing JavaScript
2019-04-24 14:02:09 +01:00
Chris Hill-Scott
f726551714 Remove unused method
We use `.get_free_sms_fragment_limit_for_year()` instead, which
functionally is the same thing (has a default argument of `year=None`).
2019-04-24 13:10:41 +01:00
Tom Byers
00c1ebf02a Add test for autofocus.js
One of the simplest of our JavaScript files to
test how difficult this is.

Answer is not too bad and includes the file
needing a DOM to operate on and jQuery in the
global scope.
2019-04-24 10:46:55 +01:00
Pea Tyczynska
b643aa54ec Basic reports page, returns 200 and is visible in PA sidebar 2019-04-24 10:44:25 +01:00
Chris Hill-Scott
9c846979be Don’t error if service without an organisation requests to go live
It was trying to look at `organisation.domains`, which caused an
`AttributeError` if there wasn’t an organisation.
2019-04-23 16:48:15 +01:00
Chris Hill-Scott
9f1bc285fa Merge branch 'master' into record-user-that-requested-to-go-live 2019-04-23 15:38:44 +01:00
Chris Hill-Scott
08e9b35d7a Don’t ask for organisation type when we know it
Every time someone adds a new service we ask them what kind of
organisation they work for.

We can look this up based on the user’s email address now. So we should
only ask the question if:
- we don’t know about the organisation
- or we haven’t set what type of organisation it is (this shouldn’t be
  possible on productions because we’ve populated the column for all
  existing organisations and it’s impossible to add a new one without
  setting it
2019-04-18 14:08:13 +01:00
Chris Hill-Scott
7beea0b2ac Merge pull request #2922 from alphagov/features-footer-second-pass
Features and footer updates
2019-04-18 13:17:16 +01:00
Chris Hill-Scott
aa16e1f2ce Add tests to make sure static pages render
This will catch if we accidentally break them by adding a `url_for` that
references a non-existant endpoint or something like that.
2019-04-18 13:06:39 +01:00
Chris Hill-Scott
9d32d40ee4 Merge pull request #2908 from alphagov/allow-invited-users-to-count
Let inviting a user complete the go live checklist
2019-04-18 11:17:56 +01:00
karlchillmaid
f3a2e695fb Merge pull request #2858 from alphagov/features-content-updates
Update features and footer content and answer some common support questions.
2019-04-16 15:42:51 +01:00
Rebecca Law
da8eead475 Update service with the user that requested to go live.
When a service is marked as live update the service with the go live datetime.
2019-04-16 15:01:54 +01:00
karlchillmaid
0ee322f137 Merge branch 'master' into features-content-updates 2019-04-16 13:50:50 +01:00
karlchillmaid
5f1482f223 Correct time formatting 2019-04-16 11:03:09 +01:00
karlchillmaid
a384ae8f9b Make the formatting of postage times consistent 2019-04-16 10:38:54 +01:00
karlchillmaid
f833a9bd67 Make the formatting of postage times consistent 2019-04-16 10:36:32 +01:00