Commit Graph

514 Commits

Author SHA1 Message Date
Nicholas Staples
c31c55666b Added current_service to flask context and template context.
Fix all tests and conflicts.

Removed comment line.
2016-04-04 17:01:20 +01:00
Nicholas Staples
a41dda8884 Working functionality for filtering notifications and all tests passing. 2016-04-04 16:34:06 +01:00
Chris Hill-Scott
7307d77923 Merge pull request #370 from alphagov/add-tour
Make first time use clearer
2016-04-04 13:40:37 +01:00
Chris Hill-Scott
94e8b2a685 Use template name as file name for example CSV
`11.csv` or `9a1d8a7f-c202-43b9-9239-68939d34fec6.csv` is not very friendly.

`Two week reminder.csv` is much nicer.
2016-04-04 11:09:55 +01:00
Chris Hill-Scott
f84797e6d5 Show an example of a CSV on the ‘send’ page
This should help:
- understanding of what the CSV should contain
- understanding what ‘download example’ will do
2016-04-04 11:09:18 +01:00
Chris Hill-Scott
5fd5544a8c Use context managers for StringIO
It’s possible that leaving a StringIO stream open could cause a memory
leak. Using a context manager closes it automatically when it’s finished
with.
2016-04-04 11:05:17 +01:00
Chris Hill-Scott
33d9a461db Put two rows in example CSV file
We reckon that this will help people understand that the first row is
headers and the subsequent rows are the users’ data.
2016-04-04 11:05:17 +01:00
Chris Hill-Scott
953be15d84 Make form error messages consistent
We were using a bunch of different styles for form error messages,
including:
- having the name of the field in the error, or not
- can not/cannot/can’t (GDS content styleguide recommends using
  contractions)
2016-04-04 10:44:53 +01:00
Chris Hill-Scott
42cb4b0d99 Remove the verbs from the navigation
Because ‘Send text messages’ isn’t very helpful if you’re looking to
edit a template.

It also helps front-load the navigation, ie ‘Team’ is the first word,
rather than the more generic ‘Manage’.
2016-04-04 09:33:29 +01:00
Chris Hill-Scott
6030cccb5d Remove the ‘next step’ banner from choose template
This page should be obvious enough that this banner isn’t needed. Will
have to keep an eye on this.
2016-04-04 09:25:41 +01:00
Chris Hill-Scott
eaa72074db Enhance the ‘how to do placeholders’ hint
This commit makes the ‘how to do placeholders’ box part of the tour,
with the same blue background.

It also adds some Javascript enhancement so that:
- it responds to the contents of the message template
- has a ‘show me’ link which inserts ‘Dear ((name))’ into the template
  contents textbox

We’ve found that this has helped people understnad what placeholders
are, and how to do them.
2016-04-04 09:25:41 +01:00
Chris Hill-Scott
5d873bdc45 Show a tour when users first create a service
This commit adds a 3 screen tour, similar to those used on GOV.UK Verify
and Passports.

We guerilla tested this on Friday, and it really helped users to build a
mental model of how Notify works, so that when they’re playing around
with it they have a greater sense of what they’re aiming to do. This
makes concepts like templates and placeholders click more quickly.

https://www.pivotaltracker.com/story/show/116710119
2016-04-04 09:25:34 +01:00
Rebecca Law
6394408228 Merge branch 'master' into email_from_uniqueness 2016-03-31 15:20:45 +01:00
Rebecca Law
9a2cb60f5e Update the service name validation in the ServiceNameForm and AddServiceForm to check the email_safe version
of the name against a list of all service email_from fields.
Update find_all_service_names to find_all_service_email_from, which returns the email_from of all services.
2016-03-31 15:17:05 +01:00
Rebecca Law
1871243cc8 Check the uniqueness of the service name ignoring case.
When the service name changes the email_from changes to.
Renamed find_all_service_names to find_all_service_names_lower.
2016-03-31 10:26:03 +01:00
Adam Shimali
fc01735d70 Removed some un needed flash messages raised as bugs.
In the process found a couple of edge cases of incorrect
use of invitation links by other users which are now
handled.
2016-03-31 09:44:01 +01:00
Rebecca Law
ab50ed6368 Merge branch 'master' into email_from_uniqueness 2016-03-31 08:37:11 +01:00
Rebecca Law
0c58d73914 Sort permissions. 2016-03-30 17:50:32 +01:00
Rebecca Law
c4b65d6af9 Fix bug with creating the invited user permission list. 2016-03-30 17:39:19 +01:00
Rebecca Law
677237ba47 Update email_from when the service name is changed.
Update unit tests
Service name is uniqueness is not based on case.
2016-03-30 17:12:00 +01:00
Nicholas Staples
0b2eeb19c5 Fix sent today bug and removed unused file.
Code quality fix.
2016-03-30 12:12:31 +01:00
Rebecca Law
f3507af006 Merge pull request #358 from alphagov/fix-permissions
Add view_activity permissions
2016-03-30 11:36:49 +01:00
Rebecca Law
e67bb5f716 Fix main_nav for platform admin
Renamed or_ to any_
2016-03-30 11:30:18 +01:00
Rebecca Law
953f2a2245 Add comment to describe view_activity 2016-03-30 10:57:03 +01:00
Rebecca Law
542d0f939e Add comment when adding the view_activity permission as a default.
Refactor client.login method so that we can start to migrate to one way to login for unit tests.
2016-03-30 10:53:15 +01:00
Rebecca Law
c99df69025 Merge branch 'master' into fix-permissions
Conflicts:
	app/main/views/jobs.py
	tests/app/main/views/test_manage_users.py
2016-03-30 10:36:55 +01:00
Nicholas Staples
ff9d3d72ad Fixed merge conflicts with master.
Code quality fixes.
2016-03-30 10:26:01 +01:00
Nicholas Staples
48daac7b94 Merging conflict with two_factor.py
Fixed merge mistake with two_factor.py.
2016-03-30 10:11:06 +01:00
Rebecca Law
1cfaeec7b2 Merge branch 'master' into fix-permissions 2016-03-30 09:32:24 +01:00
Nicholas Staples
644336b151 Merge with master. 2016-03-29 22:50:40 +01:00
Rebecca Law
a4629a290a Add view_activity to decorator. 2016-03-29 17:46:53 +01:00
Rebecca Law
99bd94799e Remove access_developer_docs permission, it doesn't make sense to need it.
Add view_activity permission when the permissions are being editted.
2016-03-29 17:33:12 +01:00
Adam Shimali
08d4e13185 Updated to use client instead of dao 2016-03-29 16:59:06 +01:00
Adam Shimali
f3fd5f6b15 After sending sms or email to self or batch then then back button
does not take user to check page, but rather the start of sending
either sms or email.
2016-03-29 16:23:01 +01:00
Rebecca Law
01959b8576 Update invited user to have the view_activity permission.
Update dashboard.html for view_activity
2016-03-29 15:20:43 +01:00
Rebecca Law
b79901fe28 With the addition of has_permissions on the dashboard, jobs, and manage_users pages a platform admin user or a users with no permissions on the service could no longer see the page.
A new permission has been added, view_activity, to resolve this issue.
Another pull request in notifications-admin will be required to update all users with a default permission of view_activity.
2016-03-29 13:23:36 +01:00
Adam Shimali
db24a633c1 Better flash message for users with active accounts who click on
verification link again.
2016-03-29 13:21:51 +01:00
Adam Shimali
352f169fb1 If user is pending it means they have not verified email yet
Added better checking on re use of consumed verification link.
2016-03-29 13:12:06 +01:00
Chris Hill-Scott
eb279c88d4 Only show ‘Choose service’ if multiple services
When the user clicks ‘GOV.UK Notify’ in the header, they should, by
default, be redirected to the dashboard for their service. They should
only see the ‘Choose service’ page if they have multiple services.

This also allows some logic to be factored out of the template, so one
route now handles all this redirection.

In the future we might want to keep the last-used service in the
session, and always redirect to that. But for now, this should fix most
of the confusion for first-time users.
2016-03-29 10:44:50 +01:00
Adam Shimali
3e167c69f2 Clean up config a bit. Get values for config from environment.
Removed some old redundant config.
2016-03-23 15:07:04 +00:00
NIcholas Staples
faaedb318d Merge pull request #338 from alphagov/service_user_permission
Functionality added to existing endpoint without a user_has_permissio…
2016-03-23 14:48:10 +00:00
Nicholas Staples
961ed6b362 Functionality added to existing endpoint without a user_has_permission decorator, tests passing.
Fix tests.
2016-03-23 14:26:12 +00:00
Chris Hill-Scott
45ea12e13f Improve display of failure rates
https://www.pivotaltracker.com/story/show/116052359

- add absolute numbers for failures
- make percentages accurate to 1 decimal place (50.0%)
- make error colour appear if failures go above 3.0%
- make error colour boolean (don’t interpolate between the colours)
2016-03-23 13:47:54 +00:00
Chris Hill-Scott
5c57f5b588 Make dashboard stats update dynamically
https://www.pivotaltracker.com/story/show/115874485

This uses the same component as on the jobs page to make a partial
section of the page update itself periodically.
2016-03-23 13:40:23 +00:00
Chris Hill-Scott
bb08589875 Merge pull request #323 from alphagov/add-terms-of-use
Add Terms of use page
2016-03-23 13:33:45 +00:00
Nicholas Staples
f3689cc113 Functionality added and all tests working.
Update correct use of permissions form.
2016-03-23 10:56:14 +00:00
Henry Hadlow
887c97facd Add Terms of use page 2016-03-23 10:26:21 +00:00
Chris Hill-Scott
0435015211 Merge pull request #332 from alphagov/make-permissions-checkboxes
Set permissions with checkboxes, not yes/no inputs
2016-03-22 17:42:34 +00:00
Chris Hill-Scott
c138a4a5e0 Set permissions with checkboxes, not yes/no inputs
The yes/no pattern didn’t work too well, because:
- it didn’t read naturally as a question and answer
- often users left them completely unclicked if they didn’t want to set
  the permission (rather than clicking no)

This commit changes both the invite and edit user pages to use
checkboxes to set permissions. If also rewords these pages to read more
naturally, and explain what the permissions mean.

This meant changing some of the view logic around invites and
persmissions, and I ended up refactoring a bunch of it because I found
it hard to understand what was going on.
2016-03-22 17:18:43 +00:00
Chris Hill-Scott
bb168c5e8d Merge pull request #325 from alphagov/view_only_team_members
View only team members
2016-03-22 15:53:02 +00:00