Commit Graph

7315 Commits

Author SHA1 Message Date
Pea Tyczynska
577e25bd52 Explain the workings of get_user_template_folders 2019-03-11 14:30:50 +00:00
Pea Tyczynska
347955a378 Make sure that only templates inside visible folders are considered
When filtering by template type we should ignore any templates that
are inside folders user does not have permission for. Otherwise the
parent folder can show up as empty instead of not showing up at
all. This adds check for user_permissions to is_folder_visible on
the service model in admin.
2019-03-11 14:30:50 +00:00
Pea Tyczynska
33c3b14feb Test how user folder permissions work on the page 2019-03-11 14:30:50 +00:00
Alexey Bezhan
3d401ce856 Hide current folder templates if user doesn't have a folder permission
TemplateList gets a list of templates in a current folder separately,
so we need to make sure `service.get_templates` checks for the
appropriate user permission
2019-03-11 14:30:50 +00:00
Alexey Bezhan
70e6732255 Only display folders the user has permission for
This adds a filter by user permissions to the list of template folders
displayed in:

* the 'choose a template page'
* "Move to" form to choose a destination folder
* "Copy an existing template" selection form
2019-03-11 14:30:50 +00:00
Alexey Bezhan
6638a0aecb Add user_id argument to TemplateList to allow filtering folders by user
Switches TemplateList to use get_user_template_folders by setting the
user_id.
2019-03-11 14:30:50 +00:00
Alexey Bezhan
80bfd8e347 Add space around folder name separator when flattening folder path 2019-03-11 14:30:49 +00:00
Alexey Bezhan
1fb7a2515f Return all templates for the user if the folder permissions flag is off
Putting the permission check in the get_user_template_folders allows
us to replace `all_template_folders` usage with the new method without
having to worry about the temporary service permission flag.
2019-03-11 14:30:49 +00:00
Pea Tyczynska
de237e9e6f Test that folders are filtered based on user permission at service level 2019-03-11 14:30:49 +00:00
Pea Tyczynska
87fb3944ce Get template folders visible to the current user
get_template_folders can filter out folders invisible to a user
2019-03-07 16:21:34 +00:00
Chris Hill-Scott
97335a11ff Merge pull request #2831 from alphagov/fix-duplicate-hint-in-list
Fix hint text for list entry being rendered twice
2019-03-07 14:07:49 +00:00
Chris Hill-Scott
aca3a2086f Merge pull request #2835 from alphagov/birminghamcc
Birminghamcc
2019-03-07 10:13:03 +00:00
Pete Herlihy
b6c51d6863 Adding Birmingham CC to the list of signed contracts 2019-03-07 10:04:23 +00:00
Pete Herlihy
725dea2da0 Adding Birmingham CC to the list of signed contracts 2019-03-07 10:04:01 +00:00
Chris Hill-Scott
0c1996e82b Merge pull request #2833 from alphagov/cheshirewestandchester.gov.uk
Mark agreement signed by Cheshire West and Chester Council
2019-03-07 09:31:24 +00:00
Chris Hill-Scott
1c59438072 Merge pull request #2834 from alphagov/torfaen.gov.uk
Mark agreement signed by Torfaen County Borough Council
2019-03-07 09:31:07 +00:00
Chris Hill-Scott
710ce46812 Mark agreement signed by Torfaen County Borough Council 2019-03-07 09:20:37 +00:00
karlchillmaid
a33c1932f8 Merge pull request #2822 from alphagov/privacy-updates
Update privacy statement
2019-03-07 09:02:23 +00:00
Chris Hill-Scott
e45eb718a9 Mark agreement signed by Cheshire West and Chester Council 2019-03-06 16:34:10 +00:00
Chris Hill-Scott
b8888aa408 Fix hint text for list entry being rendered twice
The better place for it, semantically, is inside the legend.
2019-03-06 15:35:24 +00:00
karlchillmaid
eaad921acb Update date
Update date
2019-03-05 14:41:43 +00:00
Rebecca Law
2916a3fea2 Merge pull request #2819 from alphagov/edit-folder-permissions
Edit user folder permissions
2019-03-05 12:08:40 +00:00
Alexey Bezhan
a2389fe2ca Make folder permissions form label more descriptive 2019-03-05 11:45:50 +00:00
Alexey Bezhan
6fa975e867 Send updated user folder permissions to the API
Integrates the folder permissions form with the updated API endpoint
to store changes in the user folders.

Since user folder permissions are returned in the full list of template
folders for the service we need to invalidate the cache key for it each
time we update user permissions.
2019-03-05 11:44:34 +00:00
Alexey Bezhan
3ba4a22b7c Add checkboxes-nested CSS rules 2019-03-05 11:44:34 +00:00
Pea Tyczynska
7413423243 Display nested folders permissions form on user permissions page
We're reusing the logic for the `move_to` nested radios field for the
user folder permissions nested checkboxes.

The main difference between the two forms (aside from the different
input type) is that "Move" form contains the root "Templates" as an
option, whereas the folder permissions doesn't.

It turns out that, because of the way NestedFieldMixin.children and
select_nested macro are implemented the easiest way to get the desired
folder permissions behaviour is to add the root folder as a choice with
a `None` value and `NONE_OPTION_VALUE = None` set on the field, which
allows the `child_map` to be constructed but doesn't display the root
folder checkbox itself since it gets overwritten in the final `child_map`.
2019-03-05 11:44:34 +00:00
Pea Tyczynska
340fd021bb Move field definitions before form definitions 2019-03-05 11:44:34 +00:00
Alexey Bezhan
194756bc2e Make radio form components reusable for nested checkboxes
For the template folders permission editing we need a nested
checkboxes form that is similar to "move folder" input, except
it's using checkboxes instead of radio buttons.

This moves most of the macros into a shared "select-input" components
file, which are wrapped by the existing radios.html by setting the
required input type.
2019-03-05 11:44:34 +00:00
Chris Hill-Scott
3900b675dc Correct email link typo
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-03-05 11:26:31 +00:00
karlchillmaid
263a19df02 Updated formatting of contact information
Updated formatting of contact information to bring it in line with GOV.UK style
2019-03-05 10:15:39 +00:00
Chris Hill-Scott
9bdcd81c65 Merge pull request #2826 from alphagov/westsussex.gov.uk
Mark agreement signed by West Sussex County Council
2019-03-04 11:53:42 +00:00
Chris Hill-Scott
cb2ee20a48 Mark agreement signed by West Sussex County Council 2019-03-04 11:46:05 +00:00
Rebecca Law
f236821705 Merge pull request #2825 from alphagov/should-read-text-not-email
Update the message when changing a users mobile phone number.
2019-03-04 11:24:53 +00:00
Rebecca Law
184ea5b92b Update the message when changing a users mobile phone number. 2019-03-04 11:14:35 +00:00
karlchillmaid
ac398bcbb6 Update privacy statement 2019-03-01 15:52:06 +00:00
Chris Hill-Scott
29c8f0924f Merge pull request #2821 from alphagov/dont-prefil-research-consent
Don’t prefil answer to research consent question
2019-03-01 13:21:43 +00:00
Chris Hill-Scott
4cae924379 Don’t prefil answer to research consent question
We were treating `None` (not answered) the same as `False` (previously
answered no).
2019-03-01 12:22:57 +00:00
Chris Hill-Scott
fa356f1ca7 Merge pull request #2816 from alphagov/hover-colour-task-list
Add link hover colour to task list items
2019-03-01 12:02:47 +00:00
Chris Hill-Scott
768213ee3c Merge pull request #2818 from alphagov/cyfoethnaturiolcymru.gov.uk
Mark agreement signed by Natural Resources Wales
2019-03-01 12:02:16 +00:00
Chris Hill-Scott
d288f0a8c5 Merge pull request #2817 from alphagov/hartlepool.gov.uk
Mark agreement signed by Hartlepool council
2019-03-01 12:02:09 +00:00
Chris Hill-Scott
2e0e8e4b4f Mark agreement signed by Natural Resources Wales 2019-02-28 09:50:08 +00:00
Chris Hill-Scott
dd03c731f5 Mark agreement signed by Hartlepool council 2019-02-28 09:42:50 +00:00
Chris Hill-Scott
48889daecb Add link hover colour to task list items 2019-02-27 17:44:50 +00:00
Chris Hill-Scott
645dc848fa Merge pull request #2815 from alphagov/go-live-without-volumes
Let users go live without filling in the volumes (but tag these tickets)
2019-02-27 17:41:41 +00:00
Chris Hill-Scott
7ac9884dd5 Tag tickets that haven’t filled volumes 2019-02-27 17:34:24 +00:00
Chris Hill-Scott
5f4280cf81 Let people go live without filling the volumes
At the moment it 500s because it can’t format the `None` values as
numbers.

In the future we will stop people requesting to go live until they’ve
provided this info. For now it has to be optional.
2019-02-27 17:05:02 +00:00
Chris Hill-Scott
852ae037d1 Merge pull request #2774 from alphagov/frontload-estimate-usage
Frontload estimate usage
2019-02-27 15:59:47 +00:00
Chris Hill-Scott
ae30d61884 Add full-width clickable areas
Follows what we’re doing elsewhere; make things as easy to click as
possible.
2019-02-27 15:44:01 +00:00
Chris Hill-Scott
6a6b3f78b1 Revise error message for non-numeric responses
Things we talked about:
• asking users to write the number 'as numerals' or 'using digits' isn't
  very plain English
• the style guide says to use an example in the error `..., like 5,000`
  but not if you have an example in the hint text, so we can't do that
• I have reservations about 'correct format', because it sounds odd if
  you're not describing something like a phone number, NI number or
  credit card number.

Looking back through Request to Go Live tickets on Zendesk.
---

I got to September before I found anything that would count as invalid
under our new rules:

> Possibly around 1,000,000- not planning on implementing emails yet but
might change

I'll keep looking, but if most people enter the number according to the
hint example we might be able to go with a much simpler error just
prompting them to enter a number – no convoluted descriptions of what we
mean by a number

There seemed to be more problems when the Qs were about start volume and
peak volume. Users felt the need to explain their plans more.

Using 'number' instead of 'volume' is more explicit too – so that
probably helps.

In terms of errors:
`Enter the number of emails you expect to send`
`Enter the number of text messages you expect to send`
`Enter the number of letters you expect to send`
– will probably do it, right?
2019-02-27 15:13:42 +00:00
Chris Hill-Scott
9691ef27da Round max number limit down
A round number feels better than a very arbitrary-looking one.
2019-02-27 15:13:33 +00:00