Commit Graph

302 Commits

Author SHA1 Message Date
NIcholas Staples
a23017e3f5 Merge pull request #71 from alphagov/csp-fonts
Add content security policy directive to allow loading of base64 encoded
2016-01-13 10:55:42 +00:00
Adam Shimali
9ce46c19cb Add content security policy directive to allow loading of base64 encoded
fonts.
2016-01-13 10:37:34 +00:00
Chris Hill-Scott
c94ac4266c Add confirmation of password for important changes
This commit adds an extra page or field for confirming your current password
when making important changes

Name                 | Email address     | Mobile number     | Password
---------------------|-------------------|-------------------|------------
No password required | As second page    | As second page    | On same page as new password
2016-01-12 15:30:18 +00:00
Chris Hill-Scott
df79dc69f6 Add loops for changing each part of your profile
This commit adds a page or series of pages for changing your:

Name              | Email address     | Mobile number     | Password
------------------|-------------------|-------------------|------------
Enter new value   | Enter new value   | Enter new value   | Enter new value
                  | Enter 2fa code    | Enter 2fa code    |
Return to profile | Return to profile | Return to profile | Return to profile

(each row is a page)
2016-01-12 15:30:18 +00:00
Chris Hill-Scott
ba50f132fc Add table to user profile page 2016-01-12 15:30:18 +00:00
Chris Hill-Scott
10af2bccf7 Extract user profile route into its own file 2016-01-12 15:30:18 +00:00
Adam Shimali
84b885f9eb Merge pull request #65 from alphagov/switcher-bar
Add bar containing service name, name/link to profile and sign out
2016-01-12 11:55:14 +00:00
Adam Shimali
03c7d7a0ff Merge pull request #63 from alphagov/require_login
Add login_required for all endpoints where it makes sense.
2016-01-12 11:54:33 +00:00
Chris Hill-Scott
29aaa1888c Add underlines on hover for all navigation 2016-01-12 11:47:02 +00:00
Chris Hill-Scott
4cb535a2e1 Add progressive enhancement to service switcher
- by default, the menu is open
- if Javascript is enabled/loaded, the links are hidden, and visual cues (▶) to
  show that it can be opened are added
- clicking it opens and closes it
2016-01-12 11:47:02 +00:00
Chris Hill-Scott
732efd25c7 Refactor markup
Strips it down to only what’s necessary

As a separate commit for easier diffing.
2016-01-12 11:47:02 +00:00
Chris Hill-Scott
934ce51f2c Use user’s real name, not a placeholder 2016-01-12 11:47:02 +00:00
Chris Hill-Scott
7be32be70d Fix code whitespace
As a separate commit for easier diffing
2016-01-12 11:47:02 +00:00
Chris Heathcote
8dbf266e87 Design showing opened service switcher 2016-01-12 11:47:02 +00:00
Chris Heathcote
6645f23def Remove dashboard title 2016-01-12 11:47:02 +00:00
Chris Heathcote
884e4e8057 Added in bar containing service name, user name/link to profile and sign out 2016-01-12 11:47:02 +00:00
Rebecca Law
3eefce56d4 Add login_required for all endpoints where it makes sense.
https://www.pivotaltracker.com/story/show/111240834
2016-01-12 11:26:28 +00:00
Adam Shimali
886d0c8c95 Added content security policy header.
unsafe-inline exception added to allow inline js scripts
we have in base govuk_template.
2016-01-12 11:08:10 +00:00
Adam Shimali
bfd7291426 resolve merge conflicts 2016-01-12 10:43:23 +00:00
Adam Shimali
7ad7814b3e Merge pull request #59 from alphagov/textbox-macro
Add a WTForms-compatible textbox macro
2016-01-11 16:12:02 +00:00
Chris Hill-Scott
e8fe8c50ba Add a WTForms-compatible textbox macro
This macro:
- accepts a WTForm form field as a parameter
- renders a form field which follows the GOV.UK Elements patterns, both visually
  and in markup terms

It then changes any page which uses either:
- the old, non-WTForms macro or
- the old, WTFforms `render_field` macro

…to use this new macro and removes both of the old ones.

It also adds the option to display hint text above the textbox.
2016-01-11 15:20:00 +00:00
Rebecca Law
05695a1c03 Updated generate_token to use encrypt the entire url.
Created notify_client.sender to hold the methods to send notifications.
2016-01-11 15:18:37 +00:00
Adam Shimali
dd242752c7 Merge pull request #56 from alphagov/add-styleguide
Add styleguide
2016-01-11 15:04:32 +00:00
Adam Shimali
584533eb11 First slice of csv upload of phone numbers for sending messages.
At the moment the file contents are not persisted by checked in
memory.

The first and last three records are show if all are valid.

If there are invalid rows, they are reported and the user is
prompted to go back and sort out upload file.

The storing of upload result (i.e. validation of file) in session
will be removed in next story which is about persisting of file
for later processing.
2016-01-11 15:00:51 +00:00
Martyn Inglis
e8a22f4d09 Added status page
- returns "OK" as JSON with a 200
- used in healthchecks
2016-01-11 14:54:23 +00:00
Chris Hill-Scott
928299e6fe Add 'View source' link 2016-01-11 14:27:31 +00:00
Chris Hill-Scott
85b0b4af21 Replace message_status component with banner
Message status was almost identical to banner, visually and semantically.
This consolidates the two into one component.

This means adding an extra parameter which controls whether or not the banner
has a tick (with and without a tick are the only two variations currently).
2016-01-11 14:27:31 +00:00
Chris Hill-Scott
b303e06ca0 Add a styleguide page
There are now quite a few frontend components in the app.

It’s good to have a reference for them to:
- document for developers what patterns are available and how they are used
- check for regressions
  - when working on one variation of a pattern you can check that your changes
    don’t break other variations of it
  - when changing the arguments to a pattern you can check that this doesn’t
    change the expected arguments already in use

This commit adds a single page (`/_styleguide`) which has examples of all the
patterns.
2016-01-11 14:27:31 +00:00
Rebecca Law
bb1db0c345 When the user request a reset password link, the user.state is set to request_password_reset.
Which means the user will only be able to reset their password, and not sign-in.
Once the user resets the password the user state is set to active once more.
If the link is used a second time they will be redirected to the index page with a message
that the link in the email is not longer valid.
2016-01-11 12:23:08 +00:00
Rebecca Law
0c1592905f Update sign_out to go to the index page not sign-in 2016-01-11 12:23:08 +00:00
Rebecca Law
f7373ee5fc Fix wording
Changed forgot-password so that it does not expose to the user that the email address does not exist.
2016-01-11 12:23:08 +00:00
Chris Hill-Scott
677f8891b2 Fix layout and wrong word 2016-01-11 12:23:08 +00:00
Rebecca Law
9ca2f2017f Fix argument 2016-01-11 12:23:08 +00:00
Rebecca Law
c858869a52 Removed exceptions, found a better way to handle them.
Refactored the forms so that fields like email_address can be used in multiple forms.
Refactored form validation so that a query function is passed into the form to be run, this
way the form is not exposed to the dao layer and the query is more efficient.

This PR still requires some frontend attention. Will work with Chris to update the templates.
2016-01-11 12:23:08 +00:00
Rebecca Law
ceb78f49b4 Take out the Canadian politeness.
Make the error message more consistent.
Extracted common fields for the forms.
2016-01-11 12:23:08 +00:00
Rebecca Law
35619553c8 Added NoDataFoundException 2016-01-11 12:23:07 +00:00
Rebecca Law
a860f713d2 Implementation of the new_password endpoint.
Found a way to create the token that does not need to persist it to the database.
This requires proper error messages, written by people who speak menglis good.
2016-01-11 12:23:07 +00:00
Rebecca Law
8057a138a8 Update two_factor redirect endpoint 2016-01-11 12:23:07 +00:00
Rebecca Law
b5901a1ac7 New-password endpoints are implemented.
There should be a better way to validate the token.
2016-01-11 12:23:07 +00:00
Rebecca Law
f94966154d Fix code style. Remove duplicate endpoints 2016-01-11 12:23:07 +00:00
Rebecca Law
39970144b6 fix code style 2016-01-11 12:23:07 +00:00
Rebecca Law
2cb896fa81 Completion of forgot-password endpoints.
Start implementation for new-password endpoints.
Created PasswordResetToken model
ToDo: create and save token, send valid url to user,
check validity of token, update user's password, redirect to /two-factor.
2016-01-11 12:23:07 +00:00
Rebecca Law
6696426dbc Add endpoints for forgot-password. 2016-01-11 12:22:39 +00:00
Chris Hill-Scott
567ac123e3 Merge pull request #51 from alphagov/service-settings-flow
Add pages for service settings flow
2016-01-11 11:55:46 +00:00
Martyn Inglis
7efa513777 Ensured credstash is located only with the wsgi/gunicorn code. 2016-01-11 09:59:31 +00:00
Martyn Inglis
ba4dac051b Integrated credstash as a live properties setting in the app.py class
- initial versions kept it out of this class but updated as lots of duplication and errors as config
set up in multiple places and not all picking up credstash.
2016-01-11 09:32:49 +00:00
Martyn Inglis
af713b1583 Removed flask config property lookup. 2016-01-10 21:38:53 +00:00
Chris Hill-Scott
86db5fa0b9 Make wording on 2nd-level pages match prev. commit 2016-01-08 17:17:34 +00:00
Chris Heathcote
11ea68e471 Wording changes on service settings page 2016-01-08 16:45:48 +00:00
Chris Hill-Scott
a289335661 Merge pull request #49 from alphagov/error-pages
Error pages
2016-01-08 15:13:44 +00:00