Commit Graph

523 Commits

Author SHA1 Message Date
Chris Hill-Scott
81d4230b61 Page for adding a new service
This page is exactly the same as the page for adding your first service, save
the heading text.

So all this commit does is:
- set up two routes (`/add-service`, `/add-service/first`) for each of the two
  journeys and change the existing journeys to use the `/add-service/first`
  route
- add logic to show different heading text depending on the journey
- add a link to the new (`/add-service`) route in the service chooser dropdown
2016-01-18 11:03:25 +00:00
NIcholas Staples
893378ef9f Merge pull request #80 from alphagov/api-page-design
API keys and documentation page
2016-01-18 09:19:38 +00:00
Chris Hill-Scott
0df399f11c Remove parts of the page that aren’t in the story
https://www.pivotaltracker.com/story/show/111614524

Not clear if we are going to have code examples on this page, or if the
documentation will be hosted somewhere else.

It seems unecessary to put documentation behind a log in, so I’d lean towards
this page just being links.
2016-01-17 09:40:05 +00:00
Chris Hill-Scott
e5585512c8 Integrate API key pattern into existing page 2016-01-17 09:40:05 +00:00
Chris Hill-Scott
c4544eb833 Add API key component
This commit adds a component for showing an API key. Usage:

```jinja
{{ from 'components/api-key.html' import api_key }}
{{ api_key('e1b0751388f3cd0fc9982c701acdb3c2') }}
```

Depending on the user’s browser, it works in three different ways.

No Javascript
---
The API key is shown on the page.

Older browsers with Javascript
---
The API key is hidden, and users can click a button to reveal it.

Newer browsers that support copying to clipboard without Flash
---
As above, but when the key is shown there is a button which copies it to the
clipboard. This is acheived by using
[this polyfill](https://www.npmjs.com/package/query-command-supported)
to reliably detect browser support for the ‘copy’ command.

The styling of the component is a bit different to the initial sketch. I think
a grey button works better than green. Green feels like it’s going to take you
somewhere else.
2016-01-17 09:39:09 +00:00
Chris Heathcote
e2021612b4 initial sketch for api docs page 2016-01-16 12:31:01 +00:00
Chris Hill-Scott
f3459847f1 Move view function into own file, add test 2016-01-16 12:31:01 +00:00
Martyn Inglis
67c3a5231c Made the API call use a mobiole number with no spaces 2016-01-15 15:13:59 +00:00
Adam Shimali
f4d139e511 Merge pull request #79 from alphagov/govuk-elements-npm
Install GOV.UK Elements and GOV.UK Frontend Toolkit with NPM
2016-01-15 12:21:32 +00:00
Chris Heathcote
51b1e64234 Revert "Initial design sketches for api page"
This reverts commit 4e37c02b4e.
2016-01-15 11:39:00 +00:00
Chris Heathcote
4e37c02b4e Initial design sketches for api page 2016-01-15 11:36:03 +00:00
Chris Hill-Scott
2c79787b4d Update README
No longer need to do init the submodules when first using the app.
2016-01-14 16:47:50 +00:00
Chris Hill-Scott
acd7e79c1a Remove GOV.UK Elements, GOV.UK FET submodules 2016-01-14 16:47:20 +00:00
Chris Hill-Scott
6bcbeaef70 Install GOV.UK Elements + Frontend Toolkit w/ NPM
Because:
- GOV.UK elements is now published with a package.json that only install the
  SASS files (https://github.com/alphagov/govuk_elements/pull/156)
- We can drop Git submodules, so one less dependency management tool

This commit also changes the `gulpfile.js` and `main.scss` files to use the
assets from `node_modules` rather than the Git submodules.
2016-01-14 16:45:26 +00:00
NIcholas Staples
e1f9d19b72 Merge pull request #78 from alphagov/upload-direct-to-s3
Changed flow to upload directly to s3 if non empty file.
2016-01-14 16:19:43 +00:00
Adam Shimali
494e49ee45 Changed flow to upload directly to s3 if non empty file.
Then on check page file read back from s3 and checked.
2016-01-14 16:07:06 +00:00
Chris Hill-Scott
77d34f7a09 Merge branch 'better-error-pages' 2016-01-14 14:25:51 +00:00
Chris Hill-Scott
56f82b4491 Use correct heading class and better wording on error pages 2016-01-14 14:25:38 +00:00
Chris Hill-Scott
54b66c5947 Merge pull request #77 from alphagov/manage-templates-page
Manage templates page
2016-01-14 14:11:30 +00:00
Chris Hill-Scott
9f3621b75e Use url_for to generate URLs
> it is about consistency and updates, if that endpoint changes in the future
> we don't have to update hundreds of tests for a specific string. The actual
> url should be ambiguous we are testing a view endpoint.
2016-01-14 14:03:27 +00:00
NIcholas Staples
96f7034ed3 Merge pull request #73 from alphagov/choose-service-page
Add page to choose services
2016-01-14 11:35:48 +00:00
Chris Hill-Scott
0a46a10316 Use url_for to generate URLs
> it is about consistency and updates, if that endpoint changes in the future
> we don't have to update hundreds of tests for a specific string. The actual
> url should be ambiguous we are testing a view endpoint.
2016-01-14 11:30:33 +00:00
Chris Hill-Scott
f15a59b0d6 Use 🐍 case in function names 2016-01-14 11:12:03 +00:00
Chris Hill-Scott
1e0f5c27b9 Add link to delete a template
This is a link not a button because:
- it’s less prominent—delete is an infrequent action
- it’s a two-step process, and only the second part changes any data (so it has
  a button)
2016-01-14 10:59:51 +00:00
Chris Hill-Scott
2554fbe0e0 Simplify template picker to be just radio buttons
Includes making the selection buttons work properly
2016-01-14 10:59:51 +00:00
Chris Hill-Scott
13bb1ec5ee Spaces not tabs 2016-01-14 10:59:51 +00:00
Chris Hill-Scott
75c92c12c1 Add a prototype email template
If the templates page contains text messages and emails then there’s two ways it
could be structured:
- into two sections, all text messages first, then all emails
- emails and text messages interleaved, sorted by date

I think the second one is better. Imagine a situation where you mostly do emails
but have a few text messages. You’d have to scroll past the text messages to get
to your emails. Every time.

I reckon that the most commonly accessed templates will be the most recent ones.
2016-01-14 10:59:51 +00:00
Chris Hill-Scott
c7f635be4a Add some SMS messages to the choose template page 2016-01-14 10:55:30 +00:00
Chris Hill-Scott
fe0774066d Add manage templates link to main navigation
Because it’s important
2016-01-14 10:55:18 +00:00
NIcholas Staples
d188fd6d4d Merge pull request #76 from alphagov/upload-csv-s3
Upload csv s3
2016-01-14 10:32:00 +00:00
Adam Shimali
a0e5ae59ea Added abort 400 in case of recipients param being missing. 2016-01-14 10:26:18 +00:00
NIcholas Staples
c3704b973a Merge pull request #75 from alphagov/babelrc-es2015
Be explicit about ECMAScript version of Gulpfile
2016-01-14 10:12:03 +00:00
Chris Hill-Scott
58317afdf1 Add page to choose services
Because a user can have multiple services, they need a way to navigate between
them. Normally they can use the ▶ Switcher to do this, except when:

- they first sign in
- they are on a page which isn’t associated with a service (eg user profile) in
  which case we can’t use the switcher because it won’t know what the ‘current’
  service is

So this commit adds a new page with a (fake) list of services.
2016-01-14 09:55:40 +00:00
Adam Shimali
2f802e3183 Tests pass locally and fail on travis. This is attempt to improve situation 2016-01-13 22:54:11 +00:00
Adam Shimali
d628d3d4cb missing import 2016-01-13 22:46:25 +00:00
Adam Shimali
6c688a3257 fix pep8 error 2016-01-13 22:39:44 +00:00
Adam Shimali
c729f0a29f fix up tests 2016-01-13 22:34:36 +00:00
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
Chris Hill-Scott
c82797dd98 Be explicit about ECMAScript version of Gulpfile
If Node tries to parse the Gulpfile as the wrong version of ECMAScript it will
choke.

This can be stopped by explicitly telling it what version of ECMAScript to use,
as suggested here: https://markgoodyear.com/2015/06/using-es6-with-gulp/

Fixes #74
2016-01-13 15:32:46 +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