Commit Graph

433 Commits

Author SHA1 Message Date
Chris Hill-Scott
42a6e801e4 Merge pull request #426 from alphagov/reword-recent-templates
Reword ‘recent templates’ section of dashboard
2016-04-12 10:06:27 +01:00
Chris Hill-Scott
a2263f959e Merge pull request #422 from alphagov/commas-in-placeholders
Don’t allow commas in placeholders
2016-04-12 10:06:08 +01:00
Chris Hill-Scott
7e54703e2f Reword ‘recent templates’ section of dashboard 2016-04-11 10:08:03 +01:00
Chris Hill-Scott
2912ea1806 Increase number of rows shown
We probably shouldn’t hide the contents of the CSV when people are just
testing the app, or if they’re starting off with small jobs.

A limit of 15 rows displayed was awkwardly on the cusp between just
testing and sending a small batch.

This commit increases the limit to 50; I reckon that over 50 recipients
no-one will be wanting to check them all individually.
2016-04-08 10:55:24 +01:00
Chris Hill-Scott
25079464b0 More helpful error when signed in an accept invite 2016-04-08 10:55:20 +01:00
Chris Hill-Scott
dfd8540b54 Don’t allow commas in placeholders
> If a user tries to save a template containing something like
> ((name,date)) we should give a validation error.

This is because it causes havoc with the column headers in CSV files.

https://www.pivotaltracker.com/story/show/117043389
2016-04-08 07:46:14 +01:00
Nicholas Staples
8f8cdabfff Upload csv location updated, all tests passing. 2016-04-07 12:56:57 +01:00
Adam Shimali
d7c59fa8d7 Aggregation of template stats in admin app.
Individual templates stats items fetched from admin.
2016-04-07 10:55:21 +01:00
Chris Hill-Scott
b5915dc956 Merge pull request #408 from alphagov/host-email-image
Host image used in email template in app
2016-04-07 09:38:48 +01:00
Chris Hill-Scott
66506d18bb Host image used in email template in app
Right now the crown logo in email templates is hosted on Github. Github
is not a CDN.

For now, hosting it in the app is a better solution. At some point we
should have a CDN for all assets on the app, which would be even better.

https://www.pivotaltracker.com/story/show/116952911
2016-04-07 09:29:05 +01:00
Nicholas Staples
2352b0f80d Fix issue with uppercase in the domain name. 2016-04-06 16:45:35 +01:00
Adam Shimali
2dbf522932 Add date field back into template stats 2016-04-06 15:06:02 +01:00
Chris Hill-Scott
65860c458b Merge pull request #397 from alphagov/human-readable-phone-numbers
Make it easier to deal with phone numbers in spreadsheets
2016-04-06 11:44:32 +01:00
Chris Hill-Scott
2abc336a0c Make phone numbers human readable
- in the example table on the ‘send’ page
- in the example CSV files

Implements: https://github.com/alphagov/notifications-utils/pull/18
2016-04-06 11:31:37 +01:00
Nicholas Staples
f0b604084c Fixed email bug and added new exhaustive tests. 2016-04-06 11:01:37 +01:00
Chris Hill-Scott
686493ed8f When a user accepts an invite, show them the tour
It’s jarring to be sent right into the dashboard.

We think the tour makes things less jarring.
2016-04-05 16:21:06 +01:00
Adam Shimali
eade0ef971 Added test for template stats client.
Removed date column from recently used templates table.
2016-04-05 13:50:42 +01:00
Adam Shimali
159fe60c1a Template statistics now surfaced on dashboard.
Job list removed.

Template statistics retrieved at same time as
notification stats.
2016-04-05 11:47:24 +01:00
Chris Hill-Scott
b912fa3f66 Merge pull request #376 from alphagov/dont-accepted-csv-with-restricted-recipients
Show error if restricted service uploads real CSV
2016-04-05 10:16:20 +01:00
Chris Hill-Scott
c95123914a Fix re-uploading of CSV files
The problem
---

1. Upload a CSV with problems
2. See the validation errors on the page
3. Try to re-upload the file
4. Get this error:

> Method Not Allowed
> The method is not allowed for the requested URL.

https://www.pivotaltracker.com/story/show/116882241

The cause
---
The POST route for the check page (where you see errors in your files)
was removed here:
f3fd5f6b15 (diff-1dd8b3bf53dfd9382c7721051f3d930dR280)

The fix
---
This commit adds:
- a simple route which re-calls the initial ‘I have uploaded a file’ route
- a test to make sure that both of these routes are POSTed to
2016-04-05 09:02:52 +01:00
Chris Hill-Scott
7a0a81c07c Show error if restricted service uploads real CSV
Implements: https://github.com/alphagov/notifications-utils/pull/16

Also changes a bunch of the mocked phone numbers to be real-looking so
that the tests are checking for the right kind of error.
2016-04-04 17:17:52 +01:00
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
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
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
3f57aa917c Updated from git comments 2016-03-31 10:23:13 +01:00
Adam Shimali
5346367866 updated mock expectations 2016-03-31 10:14:49 +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
Rebecca Law
e67bb5f716 Fix main_nav for platform admin
Renamed or_ to any_
2016-03-30 11:30:18 +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
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
Rebecca Law
eb72c6e5bf Refactor unit test 2016-03-30 09:31:53 +01:00
Rebecca Law
017baca5e5 Add proper mocks for the test.
Updated the localhost in the environment_test file so that if the tests fail if a mock is missing.
2016-03-30 08:41:07 +01:00
Nicholas Staples
6ad7be9083 Fix test. 2016-03-29 22:50:51 +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
0bbe35cd7d Reintroduced send sms to self test 2016-03-29 16:52:33 +01:00