Commit Graph

236 Commits

Author SHA1 Message Date
Chris Heathcote
1c73060474 add 2 test email templates 2015-12-22 11:19:06 +00:00
Rebecca Law
49a8caefa0 Add the live envirornment 2015-12-14 11:00:29 +00:00
minglis
69ac2694a5 Merge pull request #27 from alphagov/send-sms-flow
Put elements on pages for ‘send text messages’ flow
2015-12-14 10:40:55 +00:00
Chris Hill-Scott
7ac08e9a85 Simplify check and send SMS page
This commit:
- removes the row numbering so it’s easier to scan the list of phone numbers
- adds subheadings for 'first three' and 'last three'
- puts the 'see all' link at the end
2015-12-11 17:27:26 +00:00
Chris Hill-Scott
262cbffad8 Install SASS Gem on Travis
This is what was making the build fail :(((((
2015-12-11 16:31:29 +00:00
Chris Hill-Scott
c6a73c287a Improvements to send SMS page
- make messages align horizontally
- change wording of step 2 (from Lorena)
2015-12-11 14:32:43 +00:00
Chris Hill-Scott
d2562889b8 Replace CSV preview with rendered messages
If there are less than 7 messages, show them all.

If there are more than 7, show the first and last three, and a link to the
remaining x.
2015-12-11 14:02:42 +00:00
Chris Hill-Scott
4c14e273c2 Try out previewing messages 2015-12-11 12:02:21 +00:00
Chris Hill-Scott
64f03bed06 Make labels blocks, put next to message templates 2015-12-11 11:39:52 +00:00
Rebecca Law
6373455204 Update migration scripts to match the data model 2015-12-11 10:29:23 +00:00
Chris Hill-Scott
703eed3d36 Add 'back' button 2015-12-11 09:49:39 +00:00
Chris Hill-Scott
8a34fa7e0a Use Flask for routing
This commit:
- replaces links that look like buttons with forms and submit buttons
- splits the view code for SMS into its own file
- moves the routing into the Python by adding handling for `post` requests
- uses Flask’s `url_for` to generate URLs, rather than hard coding them (so that
  it’s easier to change the URLs)
- chages the URLs for sending text messages
2015-12-11 09:49:38 +00:00
Chris Hill-Scott
dbc55e76b0 Add table of recipients
Uses an adapted version of the 'summary table' pattern from Digital Marketplace
frontend toolkit:
http://alphagov.github.io/digitalmarketplace-frontend-toolkit/summary-table.html
2015-12-11 09:49:38 +00:00
Chris Hill-Scott
c4df25c8db Add a non-JS template picker
We could do something with Javascript to only show the selected template. For
now this is something that works without Javascript.

This means we can put off getting the build and testing pipeline for Javascript
set up, which is a bigger and more unknown piece of work.
2015-12-11 09:49:38 +00:00
Chris Hill-Scott
73ccea4d1f Add GOV.UK Elements as a submodule
Since GOV.UK Elements is versionned now it makes sense to bring it in as a
dependency. This enforces a separation between what generic stuff we’re using
from Elements and what is specific to our app.

The benefit is that when the generic stuff changes it will be easy to bring
those changes in.

This commit also bumps GOV.UK frontend toolkit to the latest version (v4.5.0).
2015-12-11 09:49:31 +00:00
Chris Hill-Scott
1f39a0fe61 Hard code some data in the Python
This commit adds some stubbed data for the pages. The structure of the data
is just a proposal, but it gives the templates something to work with for now.
2015-12-11 09:48:59 +00:00
Chris Hill-Scott
b46872d2b9 Add a template filter for message placeholders
As a first guess placeholders can be added to messages with the
`((placeholder))` syntax.

This commit adds a Jinja template filter to convert strings containing
said-formatted strings into HTML, which can then be styled to highlight which
parts will be substituted in messages.
2015-12-11 09:48:59 +00:00
Chris Hill-Scott
a5f4580a7f Get SASS compilation working
Main thing that was missing was including the main CSS file in the template.

There are a few hacky bits here, like moving the whole of toolkit inside the
stylesheets directory.

Would arguably be cleaner using something that isn’t Flask Assets, but that’s
something for later.
2015-12-11 09:48:59 +00:00
Chris Hill-Scott
2f980ab622 Move all pages into their own directory
There are a lot of pages. It seems like a good idea to keep them in one place,
so they don’t get mixed up with partials and layouts.
2015-12-11 09:48:52 +00:00
Rebecca Law
01c5bf5190 Update README.md 2015-12-10 16:47:29 +00:00
minglis
48ab4c5d00 Merge pull request #25 from alphagov/persis_verify_codes
Persist verify codes
2015-12-10 15:54:39 +00:00
Rebecca Law
2b4097dd2d 109526036: Updates as per comments made on pull request. 2015-12-10 15:21:06 +00:00
Rebecca Law
b5c65525af 109526036: Migration script for new table 2015-12-10 15:13:13 +00:00
Rebecca Law
20fa259316 109526036: Removed sms code from the session on sign-in 2015-12-10 14:51:20 +00:00
Rebecca Law
588730d594 109526036: Persist the verify code to the db.
The codes are hashed and saved to the db.
The code is marked as used once a valid code is submitted.
The code is valid for 1 hour.
The codes are no longer saved to the session.
2015-12-10 14:48:01 +00:00
Rebecca Law
6109306548 Update README.md 2015-12-10 09:08:26 +00:00
minglis
3b327c9986 Merge pull request #22 from alphagov/implement_two_factor
Implement two factor
2015-12-09 14:20:29 +00:00
Chris Heathcote
b60b4f6d3a Merge pull request #23 from alphagov/change_labels
Change labels
2015-12-09 14:14:38 +00:00
Rebecca Law
b1bf156b93 Merge pull request #21 from alphagov/ph-manage-template
Added skeleton page for view and edit templates
2015-12-09 14:11:05 +00:00
Rebecca Law
29c74b0da5 Add indexes to users. 2015-12-09 13:20:30 +00:00
Rebecca Law
27572ddb08 Add indexes for the users table 2015-12-09 13:20:00 +00:00
Rebecca Law
9c0a4529c1 Remove unique constraint on users.name 2015-12-09 13:13:48 +00:00
Rebecca Law
975aaf58ff 109638656: Add mocker for api client, which tries to send sms 2015-12-09 12:11:43 +00:00
Rebecca Law
f19cebd5fc Use the labels in the template rather than the form 2015-12-09 12:02:59 +00:00
Rebecca Law
5afb36cf71 Put the label in the templates rather than use the form label.
Just to make it easier.
2015-12-09 12:01:07 +00:00
Rebecca Law
9ba229820a 109638656: Implementation of two factor verification
Validation of the code is done in the form, when the form.validate_on_submit is called the validate code methods are called as well.
2015-12-09 11:36:57 +00:00
Pete Herlihy
b038e00fab Added mange templates link to the dashboard 2015-12-09 11:14:45 +00:00
Pete Herlihy
80461e330c Added an add template button to manage templates page 2015-12-09 11:09:29 +00:00
Pete Herlihy
c145a07072 Added link to template edit page 2015-12-09 10:58:01 +00:00
Pete Herlihy
65c661d8d7 Created an initial page for editing templates [ci skip] 2015-12-09 10:52:09 +00:00
Pete Herlihy
a357fea7af Added route to the edit template page [ci skip] 2015-12-09 10:50:01 +00:00
Pete Herlihy
b5f0fc3012 Added route to the manage templates page [ci skip] 2015-12-09 10:49:05 +00:00
Pete Herlihy
7f1cdd2d27 Added initial template manage page [ci skip] 2015-12-09 10:47:38 +00:00
Rebecca Law
1af2dd5e98 109638656: Use Regex validator for sms code to ensure it is 5 digits. 2015-12-09 10:17:50 +00:00
Rebecca Law
7570a80a00 109638656: Added test and moved common function to __init__ 2015-12-09 10:17:09 +00:00
Rebecca Law
2e59870490 109638656: Implement two factor verify flow
When user enters valid sms code they are redirected to the dashboard.
Otherwise, form errors are present.
2015-12-09 10:17:09 +00:00
Rebecca Law
c946f85f9d 109638656: Send sms code from sign-in post. 2015-12-09 10:16:30 +00:00
Rebecca Law
eae2756a5e 109638656: Initial implementation for two-factor 2015-12-09 10:15:41 +00:00
minglis
fcf8e8644b Merge pull request #18 from alphagov/verify_flow
Verify flow
2015-12-09 10:13:06 +00:00
Rebecca Law
ae19161b32 109526520: Use Regex validator to test the code is 5 digits. 2015-12-09 10:12:21 +00:00