Commit Graph

804 Commits

Author SHA1 Message Date
Martyn Inglis
eaf37ea29c Updated wsgi so that it can read the environment from the files present on AWS instances 2016-02-09 13:53:04 +00:00
NIcholas Staples
25f74b79bf Merge pull request #164 from alphagov/swap-3fa-fields
Swap order of fields of three factor page
2016-02-09 10:58:23 +00:00
NIcholas Staples
52ef4cb83e Merge pull request #163 from alphagov/syntax-highlight-docs
Add syntax highlighting to code examples in docs
2016-02-09 10:55:31 +00:00
Chris Hill-Scott
ff400d7857 Swap order of fields of three factor page
Most people seem to get the text message before the email, so it makes sense
for this to be the first field on the page.
2016-02-09 10:49:28 +00:00
Chris Hill-Scott
7e8046be47 Add syntax highlighting to code examples in docs
Uses the Pygments[1] package.

1. http://pygments.org/
2016-02-09 10:33:49 +00:00
NIcholas Staples
2da67fa78f Merge pull request #162 from alphagov/allow_test_number
Allow test number
2016-02-08 16:56:10 +00:00
Rebecca Law
6d318659ff fix codestyle 2016-02-08 15:23:10 +00:00
Rebecca Law
05adb1f3ad Add test number for functional testing. 2016-02-08 15:22:19 +00:00
Adam Shimali
06d9c1f7d3 Merge pull request #161 from alphagov/template-content-fix
Restore template content when deleting template
2016-02-08 13:40:47 +00:00
Adam Shimali
3b7d1f9d12 Merge pull request #160 from alphagov/front-end-lint
Add linting for SASS and Javascript
2016-02-08 13:37:45 +00:00
Chris Hill-Scott
de6ed99006 Restore template content when deleting template
When the template content was renamed in
9ee8610da0 I missed doing the same change for the
delete template route.

This commit does the same fix, so that template content is still visible when
you’re about to delete a template (so you can make sure it’s the right one).
2016-02-08 12:35:18 +00:00
Chris Hill-Scott
3f365058ef Fix problems found by SASS Lint 2016-02-08 12:02:22 +00:00
Chris Hill-Scott
0201825c45 Add linting for SASS and Javascript
Similar to how PEP8 enforces Python style, there are tools for front end code:
- jshint[1] for Javascript
- sass-lint[2] for SASS

This commit adds the Gulp plugins for both, and sets up some sensible rules
(which can be iterated on).

It also adds a command to `./scripts/run_tests.sh`, so that any errors in the
front end code will fail the build before it has a chance to be deployed.

1. http://jshint.com/
2. https://www.npmjs.com/package/sass-lint
2016-02-08 12:02:22 +00:00
Rebecca Law
d57e54874d Merge pull request #157 from alphagov/s3-errors
In case there are problems reading back the csv file from
2016-02-08 10:51:48 +00:00
Adam Shimali
cae5418a6d Merge pull request #159 from alphagov/edit-template-textbox-width
Make ‘edit template’ textboxes the same width
2016-02-08 10:47:20 +00:00
Chris Hill-Scott
d1a7c8ef39 Make ‘edit template’ textboxes the same width
This involves:
- removing the hard coded width on any textbox that does placeholder
  highlighting
- adding JS to make sure that the extra layers on top of the textbox inherit
  the width of the textbox that the user types in (so the layers don’t get
  misaligned)

Keeping the textboxes at 2/3 width for consistency with how wide the messages
are on the ‘manage templates’ page.
2016-02-08 10:03:30 +00:00
Adam Shimali
0e55c581d5 Merge pull request #158 from alphagov/title-tags
Make page titles consistent
2016-02-08 09:53:21 +00:00
Chris Hill-Scott
382cfa2907 Make page titles consistent
This commit modifies the HTML `<title>` tags for all the pages. It makes two
main changes:
- make the title tag match the `<h1>` of the page, for better or worse
- put the service name after the page title, seperated by an en dash, as per
  GOV.UK
2016-02-08 09:23:51 +00:00
Adam Shimali
3bd2565129 In case there are problems reading back the csv file from
s3 bucket flash error message instead of stack trace from s3 client.
2016-02-05 16:13:06 +00:00
Adam Shimali
4338bc9aaf Merge pull request #156 from alphagov/skip-choose-service
Skip ‘choose service’ page if user has one service
2016-02-05 15:20:34 +00:00
Chris Hill-Scott
d5656a4dc2 Add mocked get_services to test_client.login
Because the redirect after logging in checks the number of services a user has,
this now needs to be mocked.

Right now this means adding `mock_get_login` to any tests that need a login.
This must be one of the first mocks, so that it can be overridden by any use
of `mock_get_services`, for tests that specifically want to rely on a quantity
of mocked services, or their contents.

This is a bit fragile, but there’s already a TODO in the code to make it better
so ¯\_(ツ)_/¯
2016-02-05 15:11:44 +00:00
Chris Hill-Scott
939954cd64 Skip ‘choose service’ page if user has one service
We used to do this by redirecting on the choose service page. However when we
lost the dropdown and this page also became the page for adding a new service
(in 3617f2e936) the redirect was removed.

This commit re-adds the redirect on the two factor page, so that it only happens
on first login.

So the flows are:

**Multiple services**
```
`Sign in` → `Enter two factor code` → `Choose service` → `Service dashboard`
```

**One service**
```
`Sign in` → `Enter two factor code` → `Service dashboard`
```

**No services (you’ve deleted all your services)**
`Sign in` → `Enter two factor code` → `Choose service` → `Add new service`
2016-02-05 14:50:55 +00:00
NIcholas Staples
7854617453 Merge pull request #155 from alphagov/fixes-to-front-end-patterns
Fixes to front end patterns
2016-02-05 11:39:46 +00:00
Adam Shimali
5555e07b32 Merge pull request #154 from alphagov/jobs-on-dashboard
Limit number of jobs on dashboard to 5
2016-02-05 11:22:17 +00:00
Adam Shimali
0c3c91f5fb Merge pull request #153 from alphagov/send-started-flash
Add a flash message to confirm sending has started
2016-02-05 11:21:53 +00:00
Chris Hill-Scott
7dc5d76b98 Use banners appropriately
We’ve fiddled around with the banners quite a lot in the last few days. This
commit reviews some of the older examples and makes sure that they’re:

a) not broken
b) using the most appropriate banner for the context
2016-02-05 10:43:49 +00:00
Chris Hill-Scott
9c1e47d594 Fix wrapping of API key 2016-02-05 10:43:49 +00:00
Chris Hill-Scott
0fc927b458 Review usage of secondary/back links
This commit examines all the pages that use the page footer component, and
determines whether they should have a back button, a secondary link, both or
neither.
2016-02-05 10:43:49 +00:00
Chris Hill-Scott
f5807d939a Add secondary link pattern to page footer
This commit brings back the ‘link under the green button’ bit of the page footer
component.

Previous it had been changed to be a grey button. But there are use cases for
both, maybe even simultaneously.
2016-02-05 10:34:26 +00:00
Chris Hill-Scott
eba03d0bb5 Remove job ID from jobs table
Don’t think it’s something we need to surface to users.
2016-02-04 17:26:58 +00:00
Chris Hill-Scott
7e670d9662 Limit number of jobs on dashboard to 5
…and add a link to view the rest of the jobs if there are more than 5.
2016-02-04 17:25:29 +00:00
Chris Hill-Scott
7399c3c6c0 Add a flash message to confirm sending has started 2016-02-04 15:29:36 +00:00
NIcholas Staples
cf08f4ef2a Merge pull request #150 from alphagov/send-text-flow-revised
Send text flow revised
2016-02-04 14:57:43 +00:00
NIcholas Staples
984e6946ca Merge pull request #152 from alphagov/wider-texts-register
Make textboxes wider on create account
2016-02-04 14:57:29 +00:00
Chris Hill-Scott
a7d6d85d8b Make first page of ‘send texts’ use links not form
This doesn’t need to be a form—it’s not changing any data.

And having the primary action on the page as ‘Use this template’ it makes it
clear what the page is for.
2016-02-04 14:13:57 +00:00
Chris Hill-Scott
7516ec6aba Fake phone number on job page
To show what kind of data we want to surface here.
2016-02-04 14:08:57 +00:00
Chris Hill-Scott
26adcc64c1 Updates to ‘send SMS’ page
Based on discussion with Pete.

Make the blue banner an ‘important’ banner (copied from Register to Vote, used
because it’s not as boxy and fits on the page better).

Remove the back button because you haven’t changed any data yet. If you need to
go back you can just press back or start again.

Make the filename stand out more.

Remove the ‘download example’ link. Will need to revist the best way of doing
this.

Make text messages consistently 2/3rd width.
2016-02-04 14:06:19 +00:00
Chris Hill-Scott
e37123f083 Make textboxes wider on create account 2016-02-04 12:41:39 +00:00
Rebecca Law
4c461b9dbe Merge pull request #151 from alphagov/job-id-bug-fix
Service and job id were incorrectly in bucket name.
2016-02-04 12:16:07 +00:00
Adam Shimali
6c5dfcddb1 Merge pull request #149 from alphagov/add-manage-users
Populate manage users page with fake data
2016-02-04 12:12:26 +00:00
Adam Shimali
90a17bc0a7 Service and job id were incorrectly in bucket name. 2016-02-04 12:06:06 +00:00
Chris Hill-Scott
51208a9eb2 Make banner on template page real 2016-02-04 11:31:33 +00:00
Chris Hill-Scott
54cad9cf24 Remove dummy content 2016-02-04 11:07:33 +00:00
Chris Hill-Scott
48df622aba Add two steps to onboarding banner
It’s not obvious what the first steps are when you’ve just signed up.

This commit changes the banner on the dashboard to make it obvious.
2016-02-04 10:59:18 +00:00
Chris Hill-Scott
28f700366c Fix spacing of first page headers
This commit customises the margins of the first header on each page so that it
lines up with the navigation.
2016-02-04 10:59:18 +00:00
Chris Hill-Scott
4280c21b23 Updates to send and check SMS pages
Adds a back button instead of a back link (more prominent, you’re likely to
go back on these pages if you’ve made a mistake)

Tweaks to wording
2016-02-04 10:59:18 +00:00
Chris Hill-Scott
856296df5d Updates to display of jobs
This commit:
- adds the template to the jobs page (and puts it at the top of the send SMS
  page) so that it consistently appears in the same place throughout the
  journey
- put the real data about a job on the jobs page and on the dashboard
2016-02-04 10:59:03 +00:00
Chris Hill-Scott
3e7bb42323 Replace message previews on check page with table
The first 3/last 3 messages didn’t test well, it wasn’t immediately obvious what
was going on.

This commit replaces it with just a preview of the first message, and a table
showing the details of the subsequent messages.
2016-02-04 10:44:20 +00:00
Adam Shimali
2e4e354680 Merge pull request #148 from alphagov/file-uploader
File uploader
2016-02-03 17:25:58 +00:00
Chris Hill-Scott
0b47656ebc Add custom file upload to the send SMS page
This is the only place we’re doing file upload at the moment.
2016-02-03 17:16:29 +00:00