Commit Graph

987 Commits

Author SHA1 Message Date
Chris Hill-Scott
a4a93116be Put real notifications on job page 2016-03-03 11:38:38 +00:00
Chris Hill-Scott
2f76ef27ce Add API client for notifications
This commit adds an API client for the notifications endpoints added in:
https://github.com/alphagov/notifications-api/pull/113
2016-03-03 11:15:50 +00:00
Chris Hill-Scott
542f097b6d Make the template preview work
The template was displaying raw, eg ‘Hello ((name))’

This commit changes it to use the `.formatted_as_markup` property so the
template is rendered with:
- the placeholders as blue lozenges
- the service name prefixing the message
2016-03-03 11:15:50 +00:00
NIcholas Staples
a9b9927115 Merge pull request #222 from alphagov/bootstrap-front-end
Add frontend install and build to bootstrap script
2016-03-03 11:03:09 +00:00
Chris Hill-Scott
1d9cace0e5 Merge pull request #217 from alphagov/add_send_permission
Add send permission
2016-03-03 09:55:44 +00:00
minglis
2c38fa7141 Merge pull request #223 from alphagov/fix-upload-not-submitting-bug
Reset file upload field when user navigates back
2016-03-03 09:33:15 +00:00
Nicholas Staples
e3fce349e1 Fix tests with master. 2016-03-03 09:30:30 +00:00
Nicholas Staples
9b31761001 Merge remote-tracking branch 'origin/master' into add_send_permission 2016-03-03 09:20:19 +00:00
Chris Hill-Scott
f743759751 Reset file upload field when user navigates back
**Problem**

The file upload form submit automatically whenever the name of the selected file
changes.

If the user picks a file, and then navigates back the field is pre-filled
because the page is loaded from the browser’s back/forward cache.

This means that if they pick the same file again, the value of the upload field
hasn’t changed, and the form won’t be submitted.

**Solution**

The solution is to clear the form field[1] if the page is being loaded from the
back/forward cache. Then any time the user picks a file it represents and
actual change.

1. http://stackoverflow.com/questions/8861181/clear-all-fields-in-a-form-upon-going-back-with-browser-back-button
2016-03-03 09:05:43 +00:00
Nicholas Staples
1b59e5c7f1 Review comments fixed. All tests passing. 2016-03-03 09:02:56 +00:00
Chris Hill-Scott
5b073341a0 Add frontend install and build to bootstrap script
Now you don’t need to remember what the two commands are and when you need to
run them, you can just run the bootstrap script instead.

Makes sense to have them here since the `pip install` is also in here.
2016-03-03 07:54:14 +00:00
Rebecca Law
332d018d7c Merge pull request #219 from alphagov/accept-invite-part-2
[WIP] New user can now accept invite and will be made to
2016-03-02 17:58:00 +00:00
Rebecca Law
023bdbea71 Merge pull request #220 from alphagov/login-flash-category
Login flash message set to default rather than dangerous class
2016-03-02 17:53:19 +00:00
Adam Shimali
6ba13a6513 [WIP] New user can now accept invite and will be made to
register. On succesful register and verfication they
will be added to service and forwarded to dashboard.

Nothing is done yet with the permissions requested in the
invite to the user.
2016-03-02 17:52:32 +00:00
Adam Shimali
f9626a7626 Merge pull request #218 from alphagov/cancel-invited-user
Cancel invited user
2016-03-02 17:31:43 +00:00
Adam Shimali
9bab136993 Merge pull request #221 from alphagov/minor-fixes
Minor fixes
2016-03-02 17:25:18 +00:00
Rebecca Law
8acfc06432 Merge branch 'master' into cancel-invited-user 2016-03-02 17:25:17 +00:00
Rebecca Law
789264a863 Change label to exclude the type of message being sent.
Fix send email to self, it was always using mobile number to send mesasge. This fixes that.
2016-03-02 17:02:41 +00:00
Rebecca Law
1b64a212ea Change label to exclude the type of message being sent. 2016-03-02 16:49:16 +00:00
Adam Shimali
d11f88c6ff Login flash message set to default rather than dangerous class 2016-03-02 16:29:39 +00:00
Nicholas Staples
dde2fba705 Merge with master again. 2016-03-02 13:53:05 +00:00
NIcholas Staples
f0e0006a7c Merge pull request #213 from alphagov/accept-phone-or-email-column
Accept CSVs with 'email address' or 'phone number'
2016-03-02 11:27:24 +00:00
Chris Hill-Scott
b57ac2f7e5 Accept CSVs with 'email address' or 'phone number'
CSV files currently have ‘to’ as the recipient column. This is changing in
https://github.com/alphagov/notifications-api/pull/109

The admin app also has to validate that the CSV files have the right columns,
because the API expects any CSV that it’s given to have been checked (also we
want things to actually work).

This commit is the minimum code change needed. In the future it should reuse
the same code as the API for processing CSV files. This will need more thinking.
2016-03-02 10:41:35 +00:00
Rebecca Law
0b8b419798 Fix missing import on template for email_message.
https://www.pivotaltracker.com/story/show/113991355
2016-03-02 09:55:59 +00:00
Rebecca Law
65f4506028 Show status of invited user on manage team page. 2016-03-02 09:28:33 +00:00
Rebecca Law
bfea4a42bc Merge branch 'master' into cancel-invited-user
Conflicts:
	app/notify_client/invite_api_client.py
	tests/app/main/views/test_manage_users.py
2016-03-01 18:01:20 +00:00
Rebecca Law
73e5fe2907 Change cancel_invited_user client to not return anything. 2016-03-01 17:56:39 +00:00
Rebecca Law
ce5bf4e3ab Merge pull request #215 from alphagov/accept-invite
[WIP] Start of user accepting invite.
2016-03-01 17:37:12 +00:00
Adam Shimali
98169550d8 [WIP] no data needed for post to create add user to service 2016-03-01 17:32:04 +00:00
Adam Shimali
5f02d4cefe [WIP] Post does not need any data
Invites rest module can use invited user object instead
of dict.
2016-03-01 17:23:23 +00:00
Rebecca Law
8e6bd2471d Change method to a get.
Fix path param in invite_api_client.cancel_invited_user
2016-03-01 17:00:01 +00:00
Rebecca Law
219c740071 Add button to cancel invitation of invited user. 2016-03-01 16:12:26 +00:00
Nicholas Staples
efaf826e86 Merge with master. 2016-03-01 15:53:58 +00:00
Nicholas Staples
d3bc390b6c Merge with master. 2016-03-01 15:23:00 +00:00
Adam Shimali
5f3c72729e [WIP] Start of user accepting invite.
This commit only deals with acceptance by
users who are already in system.

Changed invite client to return invited user objects
instead of dictionaries.

Added commented out test. fixed up fixtures to return invited user
object for invites
2016-03-01 14:10:35 +00:00
minglis
e3740f314f Merge pull request #214 from alphagov/fix-user-page-persmission-view
Fix user page persmission view
2016-03-01 10:51:42 +00:00
Martyn Inglis
7b5e8061e2 Slight (bad) hack to ensure that the ticks appear on the manage user page
- changes imports for utils from broken version on previous branch
2016-03-01 10:45:13 +00:00
Martyn Inglis
f0b5ac9ceb Merge branch 'master' of github.com:alphagov/notifications-admin 2016-03-01 09:57:52 +00:00
Martyn Inglis
d0d2d24b66 Changed import path for python client 2016-03-01 09:57:45 +00:00
Nicholas Staples
ffe30c3070 Permissions added for templates and send_messages pages. All tests passing.
Fix up page heading.
2016-02-29 17:18:12 +00:00
minglis
900f4cd7ff Merge pull request #211 from alphagov/connect_api_keys_permission
Connect api keys permission
2016-02-29 15:48:38 +00:00
Nicholas Staples
a8db812c5a Remove print statement. 2016-02-29 15:34:22 +00:00
Nicholas Staples
58351a094c Merge with master. 2016-02-29 14:59:15 +00:00
Nicholas Staples
48943527ec API keys hooked up and working. All tests passing. 2016-02-29 14:57:07 +00:00
Rebecca Law
5c885c545c Merge pull request #210 from alphagov/create-invite-with-permissions
Invite user form now posts permissions string to api with
2016-02-29 11:38:44 +00:00
Adam Shimali
9c748404e1 Merge pull request #209 from alphagov/better-csv-guidance
Give users better guidance about CSV files
2016-02-29 11:04:48 +00:00
Adam Shimali
8c10c36f50 Invite user form now posts permissions string to api with
data to create invite.
2016-02-29 11:03:35 +00:00
Chris Hill-Scott
0cce5db3d1 Give users better guidance about CSV files
This commit adds some guidance on the ‘Add recipients’ page about what should
be in the CSV file. The guidance is contextual to the template, and based on
the problems that we saw users having yesterday.
2016-02-26 16:23:56 +00:00
NIcholas Staples
827de42d3a Merge pull request #208 from alphagov/view-user-invites
Manage user pages now surfaces invited users
2016-02-26 15:45:52 +00:00
Adam Shimali
c76717942f Manage user pages now surfaces invited users
fetched from api.
2016-02-26 15:34:12 +00:00