Commit Graph

7830 Commits

Author SHA1 Message Date
Tom Byers
a0ecbe473e Merge pull request #2957 from alphagov/add-js-tests-for-list-entry
Add JS tests for list entry module
2019-05-17 13:36:52 +01:00
Chris Hill-Scott
33b72d6abf Merge pull request #2889 from alphagov/enable-folder-permissions-globally
Remove edit_folder_permissions service setting (feature flag)
2019-05-17 12:49:03 +01:00
Alexey Bezhan
cab780b549 Remove edit_folder_permissions service setting (feature flag)
This removes the edit_folder_permission checks from the code, enabling
the folder permissions for all services.

This also fixes folder-related tests to set up appropriate user
permissions.

This should only be merged right after alphagov/notifications-api#2428,
when all other permission stories are done.
2019-05-17 11:20:16 +01:00
Chris Hill-Scott
c31dbd4de0 Merge pull request #2973 from alphagov/fidejoseph-patch-1
Update email_domains.yml
2019-05-17 11:18:26 +01:00
Chris Hill-Scott
2dc731c2d8 Merge pull request #2971 from alphagov/loading-indicator
Add a loading indicator component
2019-05-17 11:18:14 +01:00
Chris Hill-Scott
9cb6f05b88 Merge pull request #2895 from alphagov/dont-display-folder-permissions-form-for-platform-admin-users
Hide template folder permission editing for platform admin users
2019-05-17 11:18:09 +01:00
Chris Hill-Scott
81b299428f Add tests for editing folder permissions for platform admin users 2019-05-17 11:03:41 +01:00
Alexey Bezhan
5dbd229781 Hide template folder permission editing for platform admin users
Platform admin users can access all template folders, so the folder
permissions form always displays everything as checked for them,
which makes it look like the form isn't actually working. We could
do the check based on folder data, but the field still wouldn't
have any effect on permissions. So instead, we hide it completely
for platform admin users.

Submitting the form will remove any folder permissions from the DB
for the platform admin user (which can still be created by changing
permissions on the template folder 'Manage' page), but that's only
relevant if a user stops being a platform admin but keeps their
Notify services.
2019-05-17 10:46:56 +01:00
fidejoseph
6a0528f7c9 Update email_domains.yml
Adding "unifiedgov.co.uk" (Kingston/Sutton council_ and "tfwm.org.uk" (Transport for West Midlands)
2019-05-16 16:02:38 +01:00
Tom Byers
b9a2cc1ec5 Add tests for listEntry.js 2019-05-16 15:36:47 +01:00
Tom Byers
a6f39c08de Dedupe list-entry shared attributes
The `getSharedAttributes` method gathers all
attributes, and [DOM tokens](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList)
in the `class` attribute not controlled by the
module for re-applying in the `render` method.

Because it gathered them for all items, many
duplicates ended up being added to new items.

Browser engines were tidying up the duplicates
but we shouldn't be adding them in the first
place.
2019-05-16 15:36:46 +01:00
Tom Byers
84b02ee57a Remove reference to global 'this' from listEntry
Also removes setting of the `$` variable to
jQuery.

This can mess up the unit tests if they run
against JSDOM, which doesn't set the global `this`
to `window`, as browsers do.

We don't set `$` in any other module scripts and
adding it to `this` without making explicit that
`this` means `window` isn't useful.
2019-05-16 15:36:46 +01:00
Tom Byers
293a7c544f Merge pull request #2972 from alphagov/un-revert-progressively-enhanced-folder-permissions
Add progressively enhanced folder permissions back
2019-05-16 11:45:39 +01:00
Katie Smith
5df3148610 Merge pull request #2954 from alphagov/support-welsh-characters
Allow Welsh characters in SMS templates
2019-05-15 16:34:02 +01:00
Chris Hill-Scott
61b056e490 Merge pull request #2964 from alphagov/different-back-link-from-job
Always go back to previous page from notification
2019-05-15 16:26:34 +01:00
Chris Hill-Scott
9c21541d2e Merge pull request #2955 from alphagov/auto-nhs-org-type
Set org type to NHS if user has NHS email address
2019-05-15 16:26:23 +01:00
Chris Hill-Scott
e6d03ec6f8 Check that users have to choose an org type
If we can’t guess a user’s organisation then they have to choose what
type of organisation they work for when they add a new service. This
commit adds a test to make sure they can’t just click the green button
and proceed without picking one.
2019-05-15 16:16:23 +01:00
Chris Hill-Scott
5b4edc92fd Add a loading indicator component
This will let us design a page which tells the user they need to wait.
2019-05-15 15:29:47 +01:00
Katie Smith
be71aec24f Update app/templates/views/pricing.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-05-15 14:30:34 +01:00
Tom Byers
ccd09b9fd7 Revert "Merge pull request #2969 from alphagov/revert-2956-progressively-enhance-folder-permissions"
This reverts commit 8266f3d65c, reversing
changes made to b2a38fe222.
2019-05-15 14:26:51 +01:00
Katie Smith
5be6b41195 Allow Welsh characters in SMS
- This brings in the latest version of notifications-utils which
allows Welsh characters in SMS templates.
- Updated the pricing page to show the new prices for SMS with certain
Welsh characters
2019-05-15 14:20:49 +01:00
Katie Smith
00e7ccadad Merge pull request #2968 from alphagov/require-approval-on-go-live
Allow custom notes when service goes live
2019-05-15 10:51:31 +01:00
Chris Hill-Scott
4fc7498415 Include status when linking to notifications page
Without this argument the 'sending' filter doesn’t get highlighted by
default.
2019-05-15 10:04:43 +01:00
Katie Smith
da971b2da7 Allow custom notes when service goes live
This adds an option on the organisation settings page to add
'request_to_go_live_notes'. When a service belonging to this
organisation requests to go live, any go live notes for the
organisation will be added to the Zendesk ticket in the 'Agreement
signed' section.
2019-05-14 14:24:26 +01:00
Chris Hill-Scott
e4b1759b3b Merge pull request #2965 from alphagov/no-copy-paste-in-zendesk
Remove redundant info from go live emails
2019-05-14 11:43:19 +01:00
Chris Hill-Scott
d01ed30da0 Keep email address in go live ticket
It’s useful because it’s not easy to see in the Zendesk UI.
2019-05-14 11:17:47 +01:00
Tom Byers
8266f3d65c Merge pull request #2969 from alphagov/revert-2956-progressively-enhance-folder-permissions
Revert "Progressively enhance folder permissions"
2019-05-13 16:38:14 +01:00
Tom Byers
0e6caa7fda Revert "Progressively enhance folder permissions" 2019-05-13 16:19:24 +01:00
Tom Byers
b2a38fe222 Merge pull request #2956 from alphagov/progressively-enhance-folder-permissions
Progressively enhance folder permissions
2019-05-13 14:41:43 +01:00
Tom Byers
6f12a39b58 Move folder-black.png image into correct folder
Was placed in app/assets/stylesheets/ by mistake
in fe457464a8
2019-05-13 14:08:07 +01:00
Pea (Malgorzata Tyczynska)
828579ce05 Merge pull request #2958 from alphagov/precompiled_for_everyone
Remove precompiled letters permission: precompiled for everyone
2019-05-13 14:03:14 +01:00
Chris Hill-Scott
2b63b005ef Merge pull request #2967 from alphagov/fix-linking-notification-status
Only link to message status if message has failed
2019-05-13 13:55:37 +01:00
Chris Hill-Scott
61d9371134 Merge pull request #2966 from alphagov/folder-name-textbox-width
Make folder name textbox full width
2019-05-13 13:55:31 +01:00
Chris Hill-Scott
2737a8e438 Merge pull request #2938 from alphagov/schedule-buttons
Style radio select component controls as buttons not links
2019-05-13 13:55:22 +01:00
Chris Hill-Scott
3c6598cbc2 Only link to message status if message has failed
This retores the behaviour to as it was before
https://github.com/alphagov/notifications-admin/pull/2962
which inadvertently started linking to the guidance for messages that
were delivered or in sending.
2019-05-13 13:29:47 +01:00
Tom Byers
cd5f6251d1 Adjust selection summary spacing
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-05-13 13:15:45 +01:00
Tom Byers
bbc962298c Make selection summary use tabular numbers
Stops them jumping around as much when the numbers change. As requested in: https://github.com/alphagov/notifications-admin/pull/2956/files#r283271635

Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-05-13 13:07:28 +01:00
Chris Hill-Scott
e8c1a7deea Make folder name textbox full width
Folder names can be quite long. It’s annoying if they get cut off.
2019-05-13 11:04:50 +01:00
Tom Byers
fe457464a8 Fixes for folder .svg icon
Match format of .svg file to others in the same
folder to fix issues in IE11.

Add a .png alternative for IE8 users.
2019-05-10 14:59:31 +01:00
Tom Byers
d75c26eb83 Make done button, and its surround, sticky 2019-05-10 14:21:58 +01:00
Tom Byers
19b68048d0 Fix undefined local variables in sticky JS
Running the sticky JS in Jest raised errors due to
these variables not being assigned properly.

It's JavaScript so any variable not defined by the
`var` prefix will automatically become a property
of the global object. That is not what is intended
by the code so requires changing.
2019-05-10 14:20:44 +01:00
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
507b5b9933 Remove line about checklist from go live email
It’s impossible for people to go live without technically completing the
checklist now.
2019-05-10 10:46:15 +01:00
Katie Smith
1d7ce85443 Merge pull request #2962 from alphagov/update-links
Fix broken links
2019-05-10 10:35:19 +01:00
Katie Smith
f3f8f4085f Fix broken links
There were still a few links pointing to `/features/using-notify`
2019-05-10 09:05:07 +01:00
Chris Hill-Scott
d6b6f1689f Remove copy-pasteable version of go live info
We’ve automated this now so we don’t need it in a format that’s easy to
copy and paste into a spreadsheet.
2019-05-09 17:41:27 +01:00
Chris Hill-Scott
b4894e7a03 Always go back to previous page from notification
When looking at a notification you can either be coming from the page
of all notifications, or from a job. Currently the back link always
takes you to the page of all notifications.

This commit makes it a bit more sophisticated so if you’ve come from
looking at a job, you go back to the job.
2019-05-09 17:33:22 +01:00
Chris Hill-Scott
b786997c6b Merge pull request #2963 from alphagov/fix-missing-save-button-callbacks
Fix missing save button on callbacks page
2019-05-09 16:53:02 +01:00
Chris Hill-Scott
4673113451 Fix missing save button on callbacks page
😳

74fb30ce5f (diff-d32e9daf34b835cda7c3b407e14a8feeL31)
2019-05-09 16:44:34 +01:00