Commit Graph

485 Commits

Author SHA1 Message Date
Adam Shimali
4dcb180da1 Changed page flow to first save file and then redirect to check.
On check numbers in file are validated.

Posting to check then uploads file to s3
2016-01-13 17:32:40 +00:00
Adam Shimali
7c246ba3ac Merge pull request #72 from alphagov/service-specific-urls
Make URLs service-specific
2016-01-13 13:39:19 +00:00
Chris Hill-Scott
4e8f8dead7 Add stubbed template_id to template pages
So that we can get a better sense of what the URLs look like.

Leaving unsigned for now because we don’t know if the ID will be a string or int
or…
2016-01-13 13:25:06 +00:00
Chris Hill-Scott
de1c0e36c8 Add /services prefix to all service-related URLs
The URLs will be easier to parse if the parts are clearly labelled.

This is a precursor to making a blueprint for all service-related URLs.
2016-01-13 13:25:06 +00:00
Chris Hill-Scott
b4a8c2732d Add stubbed job_id
So that we can get a better sense of what the URLs look like.

Leaving unsigned for now because we don’t know if the ID will be a string or int
or…
2016-01-13 13:25:06 +00:00
Chris Hill-Scott
04b9c120d4 Add mocked service ID to all service-specific pages 2016-01-13 12:44:12 +00:00
NIcholas Staples
a469cf6bcf Merge pull request #70 from alphagov/mobile-number-validation
Mobile number validation
2016-01-13 11:48:02 +00:00
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
NIcholas Staples
d741fecb32 Merge pull request #68 from alphagov/user-profile-flow
Add user profile flow
2016-01-13 10:40:01 +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
aa43bd9e75 Add the new field to the application
This commit replaces the previous `StringField` used for collecting mobile
phone numbers with the `UKMobileNumber` field.

This means changing a few of the preexisting tests to have more realistic mobile
numbers so that they still pass.
2016-01-13 09:43:32 +00:00
Chris Hill-Scott
791324588b Test for specific error messages
This commit:
- improves the tests to check for specific error messages, rather than just
  pass/fail
- makes the error messages more human, and more suggestive of what the user
  needs to do to fix the error
2016-01-13 09:43:32 +00:00
Chris Hill-Scott
faa3b9ca7c Add form field for a UK mobile phone number
This field does two things:
- validates the format of the phone number
- outputs a consistent representation of the phone number

Because of this I think it’s better represented as a new field type, rather
than individual validators.

I also think that it’s better to do this without regular expression(s), because
it makes returning the specific error easier.

This commit also adds basic pass/fail test for a series of valid/invalid
phone numbers.
2016-01-13 09:42:37 +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
Chris Hill-Scott
554f11961f Merge pull request #69 from alphagov/fix-travis-js
Fix flakiness with Gulp + Travis
2016-01-12 15:29:51 +00:00
Chris Hill-Scott
1b7658e09a Fix flakiness with Gulp + Travis
Gulp was failing silently on Travis. I tracked this down to the task that
builds a custom, slimmed-down version of jQuery from source.

To fix this I’ve removed the task and replaced it with just `src`ing the
minified version of jQuery from `node_modules`.

Cons:
- A few more kb of JS

Pros:
- Less random, afternoon-chewing complexity
2016-01-12 15:16:16 +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
6d12953cce Merge pull request #67 from alphagov/content-security
Added content security policy header.
2016-01-12 11:35:42 +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
Rebecca Law
7190513dc2 Merge pull request #61 from alphagov/csv-upload
First slice of csv upload of phone numbers for sending messages.
2016-01-12 10:50:25 +00:00
Adam Shimali
bfd7291426 resolve merge conflicts 2016-01-12 10:43:23 +00:00
Adam Shimali
23c4cbbf76 Merge pull request #66 from alphagov/add-badges
Add badges for requirements and code coverage
2016-01-12 09:54:57 +00:00
Chris Hill-Scott
003c7e097a Remove badge for code coverage
It needs more integration, which I’m not sure we want at the moment.
2016-01-12 09:47:35 +00:00
Chris Hill-Scott
840185017c Add badges for requirements and code coverage 2016-01-12 09:38:55 +00:00
Martyn Inglis
e075145945 Putting this back in the dependencies file for now
- this fails on the instance and not sure why, putting back till I can figure it out
2016-01-11 17:32:24 +00:00
Martyn Inglis
35b4f8f3a7 Removed the db upgrades 2016-01-11 17:23:10 +00:00
minglis
1866b04eaf Merge pull request #64 from alphagov/move-db-updates-to-be-run-by-ubuntu
New script to run db updates so can be done by ubuntu user
2016-01-11 17:11:41 +00:00
Martyn Inglis
362b2aeba7 New script to run db updates so can be done by ubuntu user 2016-01-11 17:00:04 +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
Adam Shimali
c768d51188 Merge pull request #62 from alphagov/forgot-password
Encrypt entire url for password reset
2016-01-11 15:25:33 +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
minglis
aa44a7b036 Merge pull request #60 from alphagov/add-status-page
Added status page
2016-01-11 14:57:37 +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
Martyn Inglis
bfb2267249 Updated travis to have build numbers etc on deloyed artifact 2016-01-11 14:43:07 +00:00