Commit Graph

4767 Commits

Author SHA1 Message Date
Athanasios Voutsadakis
d8dabcfbbf Remove appspec and related files
These have not been used since the migration to paas, so they can be
removed.
2018-01-02 14:24:26 +00:00
Athanasios Voutsadakis
5a9d5cd065 Remove unused targets and variables from Makefile
Remove `cf-build` and `cf-build-with-docker` as they are not being used
Remove `build-codedeploy-artifact` in favor of `build-paas-artifact`
Remove `upload-codedeploy-artifact` in favor of `upload-paas-artifact`
Remove `deploy`, `check-aws-vars`,
`deploy-suspend-autoscaling-processes`,
`deploy-resume-autoscaling-processes`,
`deploy-check-autoscaling-processes` as they are remains of the pre-paas
era.

Consequently some variables became obsolete, namely: `CODEDEPLOY_PREFIX`
`CODEDEPLOY_APP_NAME`, `DNS_NAME`, `AWS_ACCESS_KEY_ID` and
`AWS_SECRET_ACCESS_KEY` and they are removed.
2018-01-02 12:29:50 +00:00
Katie Smith
e3cf2bd455 Merge pull request #1726 from alphagov/ignore-case-of-invited-user-email-addresses
Make email addresses case insensitive when inviting users to services
2018-01-02 09:43:33 +00:00
Katie Smith
309396c906 Make email addresses case insensitive when inviting users to services
Email addresses in invites should be case insensitive. This is to stop
the bug where a user creates their account using a lower case email
address (e.g. user1@gov.uk), but is then invited to a service using
their email address in a different case (e.g. USER1.gov.uk) and sees
an error message telling them that they can't accept an invite for a
different email address.
2018-01-02 09:26:49 +00:00
Pete Herlihy
31b3147f1d Merge pull request #1734 from alphagov/121-127
121-127 and 51-52 orgs
2017-12-28 11:26:05 +00:00
Pete Herlihy
68f5c0940b Merge branch 'master' into 121-127 2017-12-28 11:16:34 +00:00
Leo Hemsted
c8088f5062 Merge pull request #1735 from alphagov/reqs-txt
Update requirements.txt
2017-12-28 11:06:39 +00:00
Pete Herlihy
d24fe480fd Bumped to 128 and 53 for NCC Libraries 2017-12-28 10:46:20 +00:00
Leo Hemsted
21961a3bd2 bump utils
utils no longer needs smartypants from git
2017-12-28 10:08:16 +00:00
Leo Hemsted
99db15d975 fix notifications-python-client version import 2017-12-28 10:05:54 +00:00
Leo Hemsted
32db08269d Update requirements_for_test.txt 2017-12-28 10:01:56 +00:00
Leo Hemsted
a6d2f9cf4d Update requirements.txt
bring in all pyup changes
2017-12-28 10:00:55 +00:00
Pete Herlihy
742d9ceebc 121-127 and 51-52 orgs
DVLA DM Contact Centre	Driver & Vehicle Licensing Agency
DVLA Contact Centre Complaints	Driver & Vehicle Licensing Agency
School Admissions Buckinghamshire County Council	Buckinghamshire County Council
Submit a GAR	Home Office
G-Cloud Commercial Agreement Team	Crown Commercial Service
Tracio Fflyd	Gwynedd Council
2017-12-27 12:44:16 +00:00
Rebecca Law
1c45c00c9e Merge pull request #1722 from alphagov/letter-on-usage-page
Letters on usage page
2017-12-21 14:29:22 +00:00
Rebecca Law
ff01759cce Merge branch 'master' into letter-on-usage-page 2017-12-21 14:24:40 +00:00
Rebecca Law
2f118a78a1 Merge branch 'master' into letter-on-usage-page 2017-12-20 16:31:23 +00:00
Rebecca Law
e7f94bd007 Add a template to show letter usage if the service has the letter permission 2017-12-20 16:28:40 +00:00
Chris Hill-Scott
7aa38028a9 Merge pull request #1721 from alphagov/5px-bug
Fix bug horizontal scrollbar being pushed off page
2017-12-20 15:50:40 +00:00
Chris Hill-Scott
aa22568c64 Fix bug horizontal scrollbar being pushed off page
We weren’t calculating the height quite right; we were trying to
compensate for something that should have been compensated for in the
`stick-at-top-when-scrolling` code.

Add the 5px to the shim there is required because we’re adding it to the
element that the shim in replacing.
2017-12-20 15:37:34 +00:00
Chris Hill-Scott
86ab2bbe1b Merge pull request #1716 from alphagov/pyup-update-pyexcel-xlsx-0.5.4-to-0.5.5
Update pyexcel-xlsx to 0.5.5
2017-12-20 12:40:01 +00:00
pyup-bot
d6ba0546f9 Update pyexcel-xlsx from 0.5.4 to 0.5.5 2017-12-20 12:32:52 +00:00
Chris Hill-Scott
92679d4cef Merge pull request #1686 from alphagov/full-screen-row-errors-3
Allow horizontal scrolling for big spreadsheets
2017-12-20 12:30:42 +00:00
Chris Hill-Scott
c6f54966bf Change tables to scroll in-page, not full screen
There were three problems with showing tables fullscreen:
- it was over-optimised for very big spreadsheets, whereas most users
  will only have a few columns in their files
- it was jarring to go from full screen and back to the normal layout
- it was a bit change for existing users, where we prefer incremental
  changes that make things better without disrupting people’s work
  (where possible)

So this commit changes the big table to scroll horizontally in the page,
not take up the full width of the page.

From the fullscreen table it keeps:
- the shimming method to keep the horizontal scrollbar at the bottom of
  the screen at all times

It introduces some more refinements to make it nicer to use:
- fixing the first column, so you always know what row you’re on
- adding shadows indicate where there is content that’s scrolled outside
  the edges of the container
2017-12-20 12:09:18 +00:00
Chris Hill-Scott
e3be2522f4 Fix jumpy cancel button 2017-12-20 12:09:18 +00:00
Chris Hill-Scott
a58cb75b88 Force scrollbar always visible on OS X 2017-12-20 12:09:18 +00:00
Chris Hill-Scott
8bfb67c702 Go fullscreen for row-level errors in spreadsheets
Two bits of context:

1. As we start dealing with letters, which have more columns, it’s more
   likely that people’s spreadsheets won’t fit in our current layout.

2. We already removed the view of the template from the page that shows
   row-level errors (eg bad phone number or missing personalisation) in
   spreadsheets because you don’t need to know about the content of the
   message in order to fix the errors.

This commit goes further by removing anything that isn’t to do with
the errors, including the normal GOV.UK header and the service’s
navigation.

This means the content can go the width of the page, which means it can
be allowed to scroll horizontally without being a usability car
crash. Which means that the layout doesn’t break with a spreadsheet that
has lots of columns.
2017-12-20 12:09:18 +00:00
Chris Hill-Scott
abdbaf6cbb Merge pull request #1696 from alphagov/preview-any-row
Add URLs for previewing all rows of a spreadsheet
2017-12-20 12:07:19 +00:00
Chris Hill-Scott
eb395db2d6 Fix error when file has header rows but no data
Previously the error was saying ‘It needs at least one row of data, and
columns called None’.
2017-12-20 11:59:51 +00:00
Chris Hill-Scott
5f5dd3ac41 Rewrite check for row existence as conditional
Because exceptions can be expensive performance wise (see:
https://docs.python.org/3/faq/design.html#how-fast-are-exceptions).

Since we’re counting the number of rows anyway this doesn’t introduce
any performance overhead there. And I think it’s equally readable/same
number of lines of code.
2017-12-20 11:48:30 +00:00
Chris Hill-Scott
c3e2bce98b Add URLs for previewing all rows of a spreadsheet
We’ve heard from some users, especially those sending letters, that
they’d like to check that a spreadsheet they’ve uploaded has populated
the template correctly.

My reckon is that seeing just one row of the spreadsheet populate the
template isn’t enough to give people confidence that everything’s
working properly. So this commit is the first step towards being able
to preview an arbitrary row of a template, by extending the URL
structure to optionally accept a row number for pages or files (ie PNG)
that preview successfully uploaded spreadsheets.

What this commit doesn’t do is link to these pages; that will come as
part of a subsequent commit.
2017-12-20 11:15:38 +00:00
Chris Hill-Scott
587e18d2ef Lookup index, rather than iterating
Since instances of `Recipients` are now iterable we can just look up the
first row by index, rather than having to hit the rows property as a
generator.

There is a chance that there won’t be a first row, if the file has 1 or
fewer columns. So we still need to handle a possible exception (albeit
it a different one to before).
2017-12-20 11:15:37 +00:00
Chris Hill-Scott
3e5deeffdb Split successful upload test into two
Easier to test the individual aspects of what’s going on here if they’re
two separate tests, one hitting the initial `POST`, and one hitting the
page that they’re subsequently redirected to.
2017-12-20 11:15:37 +00:00
Chris Hill-Scott
71368301f7 Make test use new fixture
The `client_request` fixture means the tests take fewer lines of code
and also checks some extra things (eg page titles matching <h1>s).

Changing it in this commit, independently of functional changes to this
test.
2017-12-20 11:15:37 +00:00
Chris Hill-Scott
5bac021493 Remove unused variable
This variable isn’t used by our Jinja templates. Presumably it was
from the time before instances of `Template` were responsible for
showing who the email/text message was being sent to.
2017-12-20 11:15:36 +00:00
Rebecca Law
b7db7debc5 Add letters to usage page.
Before this goes live need to only show letters on usage if the service has the permission.
2017-12-19 14:35:10 +00:00
Chris Hill-Scott
acdaad966c Merge pull request #1715 from alphagov/quis-patch-1
Fix page titles on callbacks documentation
2017-12-18 14:40:12 +00:00
Chris Hill-Scott
3a67555d4d Update callbacks.html 2017-12-18 14:14:36 +00:00
Chris Hill-Scott
3df3c61279 Fix page titles on callbacks documentation
This page is no longer just about inbound.
2017-12-18 14:13:40 +00:00
Chris Hill-Scott
821ba2acd2 Merge pull request #1714 from alphagov/mmo
Add Marine Management Organisation as email domain
2017-12-18 12:43:38 +00:00
Chris Hill-Scott
08c007d998 Add Marine Management Organisation as email domain
Seems like sometimes they use a Defra email address, sometimes their
own .org.uk one.
2017-12-18 11:52:56 +00:00
Rebecca Law
084be530a6 Merge branch 'master' into letter-on-usage-page 2017-12-18 11:02:20 +00:00
Rebecca Law
43747bd1ea Add letter usage to usage page.
Still need to add the summary info.
2017-12-15 17:28:52 +00:00
Chris Hill-Scott
05c7be8950 Merge pull request #1709 from alphagov/remove-error-stuff
Remove error-handling code from OK page
2017-12-15 15:00:59 +00:00
Chris Hill-Scott
fa3885d47d Remove error-handling code from OK page
`ok.html` is only used when there’s a spreadsheet which doesn’t have
any errors in it.
2017-12-14 18:06:25 +00:00
Chris Hill-Scott
ef55feba36 Merge pull request #1707 from alphagov/120-121
120-121 for Analyse School Performance
2017-12-14 11:29:06 +00:00
Pete Herlihy
2378854cc8 120-121 for Analyse School Performance 2017-12-14 11:20:16 +00:00
Chris Hill-Scott
81e4f27efc Merge pull request #1701 from alphagov/strip-whitespace
Strip whitespace before validating any form
2017-12-14 11:18:48 +00:00
Chris Hill-Scott
a8829cd154 Make whitespace stripping work for whitelists too
It’s a bit hacky, but it fixes a potential issue for users.

Code adapted from:
2c34f678ab
2017-12-14 11:06:55 +00:00
Chris Hill-Scott
d0d230f119 Remove existing whitespace stripping code
Since we’re doing this globally, we don’t need to handle it in a custom
way for the sign in form (and it’s much nicer encapsulated like this).

Also added some more extensive tests in this commit.
2017-12-14 11:06:55 +00:00
Chris Hill-Scott
70badae575 Strip whitespace before validating any form
We’ve had whitespace-in-emails problems on:
- register form
- sign in form
- send one off form

We should just handle whitespace gracefully, by ignoring it. Makes sense
to do this at a global level because there might be other places it’s
causing problems that we don’t know about.

The only place that users _might_ be relying on leading/trailing spaces
(and we have no way of knowing this) is in passwords or tokens. So this
filter ignores any instances of `PasswordField`.

Adapted from @pcraig3’s work on Digital Marketplace:
- 4b06f5cfb7
- e761c1ce65
2017-12-14 11:06:55 +00:00