Commit Graph

7170 Commits

Author SHA1 Message Date
Leo Hemsted
2cd8304061 Merge pull request #1082 from alphagov/persist-letters
allow creation of letter jobs
2017-01-31 10:31:34 +00:00
Rebecca Law
6d883b59ad Changed deactivate service to archive service.
need to deploy https://github.com/alphagov/notifications-api/pull/808 first
2017-01-31 09:54:51 +00:00
Chris Hill-Scott
53561c8a82 Merge pull request #1095 from alphagov/quis-patch-1
Update count of services on dashboard
2017-01-30 11:48:58 +00:00
Chris Hill-Scott
2786de7a16 Merge pull request #1092 from alphagov/templates-page-title
Make page title on template usage page match link
2017-01-30 11:48:51 +00:00
Rebecca Law
dc9524f01e WIP: First attempt at adding a testing doc to the links in the footer.
This may result in changing the developer document section completely.
2017-01-27 17:32:20 +00:00
Chris Hill-Scott
b538e20569 Update count of services on dashboard
One of the services in Notify is actually 2 services sharing an account.
2017-01-27 14:40:17 +00:00
bandesz
10883176e0 Update branch to master in Jenkinsfile 2017-01-27 13:56:46 +00:00
Chris Hill-Scott
a99aeaa136 Make page title on template usage page match link
For consistency. Going to revisit this page shortly.
2017-01-25 14:43:56 +00:00
Rebecca Law
49ce146790 Merge pull request #1091 from alphagov/fix-back-button
Fix back button on breaking-change.html
2017-01-25 08:57:41 +00:00
Rebecca Law
de94f369a7 A bug was reported on where editting a template with a breaking change.
The url was not being properly formed, missing the tempalte_id, meaning the back button on the page did not work.

This fixes that, includes a check of the url for the back button.
2017-01-24 17:42:18 +00:00
Chris Hill-Scott
c380b92104 Merge pull request #1083 from alphagov/removed-download-link
Removed download link on the notifications page.
2017-01-24 17:29:00 +00:00
Chris Hill-Scott
155fe70960 Merge pull request #1090 from alphagov/fix-trial-mode-error
Fix trial mode error message when uploading CSV
2017-01-24 17:17:05 +00:00
imdadahad
6817d84808 Merge pull request #1086 from alphagov/fix-sent-totals-on-platform-admin
Fix: Platform admin showing incorrect sent totals
2017-01-24 12:25:48 +00:00
Imdad Ahad
4d124a5711 Refactor test to use client fixture 2017-01-24 11:01:44 +00:00
Chris Hill-Scott
920ac6115c Fix trial mode error message when uploading CSV
Problem: it wasn’t saying ‘phone number’ or ‘email address’

Why: we renamed `Recipients.recipient_column_header` to
`Recipients.recipient_column_headers`, and made it return a list, not
a string.

The fix: take the first item of the list, and use that to decide whether
it’s phone numbers or email addresses that you’re not allowed to send
to.

N.B. This won’t work for letters, but we don’t know how trial mode is
going to work for letters anyway.
2017-01-23 22:42:08 +00:00
Chris Hill-Scott
b30f867f88 Merge pull request #1089 from alphagov/add-video-product-page
Add introducer video to the product page
2017-01-23 16:38:17 +00:00
Chris Hill-Scott
97b02edbf9 Add introducer video to the product page
It’s always been the plan to put this video on the product page. Just
getting round to it now.

Watch the video here: https://www.youtube.com/watch?v=i2a2jiwYTd4

Uses the CSS developed by the service manual team, taken from here:
a5c613f07b/source/stylesheets/modules/_responsive-embed.scss
2017-01-23 16:25:11 +00:00
Chris Hill-Scott
e50ca05105 Merge pull request #1088 from alphagov/fix-tick-cross-ie8
Fix ticks and crosses on team page in IE8
2017-01-23 15:24:23 +00:00
Chris Hill-Scott
6a61fe0674 Merge pull request #1087 from alphagov/fix-tour-opacity-ie8
Fix highlighted step on tour in IE8
2017-01-23 15:24:13 +00:00
Chris Hill-Scott
b0f0d68ce0 Merge pull request #1085 from alphagov/fix-dashboard-totals-ie
Fix dashboard totals in older IE versions
2017-01-23 15:24:04 +00:00
Chris Hill-Scott
91ed889bfd Merge pull request #1084 from alphagov/fix-pill-ie
Fix layout on job and activity in old IE versions
2017-01-23 15:23:55 +00:00
Chris Hill-Scott
a8c60a510b Merge pull request #1080 from alphagov/product-breadcrumb
Add a breadcrumb to the product page
2017-01-23 15:23:45 +00:00
Chris Hill-Scott
37d4ab87df Add a breadcrumb to the product page
This copies what the other GaaP components will be doing for their
product pages.

The SASS and HTML is taken from here:
f05ca1fb71/source/stylesheets/modules/_breadcrumbs.scss

Only changes I’ve made are:
- making the file paths work with our build pipeline

Changes to our code to accomodate this are:
- putting the padding on the product page `<h1>` not its container
- moving the hero image accordingly so that it lines up
- making the `<main>` element on the product page into an anchor so that
  the breadcrumb can link to it – screenreader will then announce the
  link as “GOV.UK Notify, same page”
2017-01-23 13:50:30 +00:00
Chris Hill-Scott
e56433e1f8 Fix ticks and crosses on team page in IE8
The ticks and crosses on the team page are served bigger than actual
size (128×128px). They are then resized using CSS3 `background-size`
to their displayed size (19px).

The reason for doing this is so they display crisply on retina screens.

IE8 doesn’t support `background-size` (see
http://caniuse.com/#feat=background-img-opts). This means that the ticks
and crosses get show at their original size (way too big).

This commit adds resized versions of the ticks and crosses which are
then served to these older browsers only.
2017-01-23 13:02:36 +00:00
Chris Hill-Scott
9e5529bea5 Fix highlighted step on tour in IE8
We grey-out the non-current step in the tour so the user knows whether
they’re at step 1, 2, or 3.

This is done using CSS opacity.

IE8 doesn’t support the standard CSS opacity syntax. But it does support
the weird, old, Microsoft-specific `filter:` syntax. So this commit:

- makes the greying out a class rather than an inline style, to reduce
  duplication
- adds the filter syntax so the greying out works in IE8
2017-01-23 12:53:44 +00:00
Imdad Ahad
343bf9ab98 Show delivered+failed on platform admin sent totals 2017-01-23 11:59:37 +00:00
Chris Hill-Scott
d6606fcb70 Fix dashboard totals in older IE versions
The layout of the totals on the dashboard was getting horizontally
squashed on older versions of IE.

This was something to do with the `grid-row` CSS class no longer being
applied when AJAX updated the page. Grid columns don’t work properly
unless they’re contained in a grid row.

This commit wraps the `div` with `grid-row` in another `div`. Not
totally sure why this works, but it’s something to do with how the
DiffDOM algorithm is working. Seems like the simpler the diff it has to
compute, the better chance it has of not messing things up.
2017-01-23 11:56:01 +00:00
Chris Hill-Scott
04c17ecfc0 Make vertical spacing CSS classes work with floats
We have a bunch of helper classes (bottom gutter) which are used to
vertically separate components on the page.

This vertical spacing might get ignored if one of these containers
contains floated items. This is because:

> elements that contain floated items don't take those floated items
> into account in calculating their height
– https://css-tricks.com/containers-dont-clear-floats/

GOV.UK Frontend toolkit has a shim to prevent this from happening.
d15e738b92/stylesheets/_shims.scss (L38-L55)

So this commit uses that shim to make the spacing consistent in older
and newer browsers, irrespective of whether floats are being applied.

This hasn’t been a problem because we’re not using a lot of `float` in
Notify. But we are using it now to work around some other
inconsistencies in old browsers.
2017-01-23 11:27:01 +00:00
Chris Hill-Scott
7cdf6c2495 Fix status counter in old IE versions
We use flexbox to lay out the counts of sending/delivered/failed on the
activity and job pages. flexbox makes the best use of the space when
the numbers can be significantly different widths (eg 0 sending, 5000
delivered).

Flexbox was only supported from IE 11 onwards [1]. And since we were
setting the `display` property of the individual numbers to `block` they
were rendering one-per-line on browsers that don’t support flexbox.

This commit changes these items to be floated and a predefined width. In
browsers that support it, flexbox seems to override these hard-coded
widths. It’s not quite as good as the flexbox solution because:

- it doesn’t adjust the widths in the nice way that flexbox does

- it’s hard-coded to expect 4 items (we don’t have this component with
  any other number of items at the moment, so it won’t actually break
  anything)

But it’s pretty much OK because:

- it’s a lot better than the before

- IE 8 and 9 combined only make up 5% of our users, and this will be a
  declining number

- polyfilling flexbox would mean using Javascript, and we don’t serve
  working Javacript to IE 8 users anyway

1. http://caniuse.com/#feat=flexbox
2017-01-23 10:57:14 +00:00
Martyn Inglis
923d057787 Removed download link on the notifications page.
- This is a big download of unfettered data. This needs to be more nuanced to be useful
2017-01-20 16:40:49 +00:00
Leo Hemsted
51f3e0478a allow creation of letter jobs 2017-01-20 16:20:37 +00:00
Chris Hill-Scott
3b1c0c3e02 Merge pull request #1078 from alphagov/sanitize-html-in-templates-using-utils
Sanitize HTML in templates using utils
2017-01-20 13:44:52 +00:00
imdadahad
18b2936223 Merge pull request #1077 from alphagov/fix-row-number-issue-on-report-download
Fix issue where row_number starts from 3 on a job report download
2017-01-20 12:38:50 +00:00
imdadahad
f8cb5e59a9 Merge pull request #1074 from alphagov/show-last-updated-on-view-providers
Add last updated column (formatted) in view providers table
2017-01-20 12:38:29 +00:00
Leo Hemsted
44eedfb8bf Merge pull request #1081 from alphagov/send-back-in-help
send users back to beginning of tour if they hit back at end
2017-01-20 11:43:12 +00:00
Leo Hemsted
ef91c374a5 send users back to beginning of tour if they hit back at end
(previously it would have sent them to the choose template page)
if the user has added new templates or deleted the example one,
they're clearly competent enough to use the app so don't worry
(we wouldn't know what URL the tour starts on since the UUID of
the example template is random)
2017-01-20 10:45:29 +00:00
Chris Hill-Scott
04966e4051 Test that template content passed to API is dirty
We don’t want sanitized content going into the database, because
sometimes we need the content unsanitised. The path from admin to the
API is where the template goes on it’s way to the database. So let’s
make sure we’re not sanitizing it at this stage.
2017-01-19 16:51:53 +00:00
Chris Hill-Scott
597c6da857 Sanitize HTML in templates using utils
We can no longer trust that the content of templates stored in the
database is safe.

Utils now has code to sanitise the content of templates.

This commit:
- updates utils to bring this code in
- modifies some integration tests to make sure everything is working
  (there are more extensive unit tests in utils)
2017-01-19 16:34:34 +00:00
Leo Hemsted
689c199b8c Merge pull request #1079 from alphagov/send-back-button
when pressing back after sending CSV redirect properly
2017-01-19 16:26:25 +00:00
Imdad Ahad
b7099ebb3c Modify stub providers with default values for consistency 2017-01-19 15:41:09 +00:00
Leo Hemsted
9e414ef3c0 when pressing back after sending CSV redirect properly
previously we were issuing a flask redirect (302) from the function,
which we then attempted to unpack as a dict further down the line.

raise a werkzeug.routing.RequestRedirect (301 MOVED PERMANENTLY)
instead. note: only use this pattern when the URL they attempted to
access will *NEVER* be valid, as 301s are cached by browsers.
2017-01-19 15:20:30 +00:00
Imdad Ahad
5365015adf Optimise the check 2017-01-19 10:57:11 +00:00
Imdad Ahad
6a48325b3b Fix issue where row_number starts from 3 on a job report download 2017-01-19 10:42:58 +00:00
Rebecca Law
810aaf50e8 Merge pull request #1076 from alphagov/change-select-to-radio
Change the selectField on the edit template form to a radio field.
2017-01-19 10:00:29 +00:00
Rebecca Law
d0c762325d remove comment 2017-01-19 09:50:27 +00:00
Rebecca Law
b372ab7ba1 Change the selectField on the edit template form to a radio field.
It's more stylish
2017-01-19 09:35:34 +00:00
Rebecca Law
134190332f Merge pull request #1075 from alphagov/update-template-with-priority-if-platform-admin
Create or update templates with priority as platform admin
2017-01-18 16:14:18 +00:00
Rebecca Law
babafd8dc9 Change the drop down to read Use priority queue? yes|no 2017-01-18 16:03:30 +00:00
Rebecca Law
3dfb3806d2 Add a selectField to edit and create templates that is only visible for platform admins that makes the template a priority template.
There is a check that the template can not be created as priority if the user is not a platform admin.
There is a check that the template can not change the `priority` unless they are a platform admin.
2017-01-18 15:11:34 +00:00
Chris Hill-Scott
a40cfa4682 Merge pull request #1069 from alphagov/update-utils-nimbus
Bump utils
2017-01-18 14:35:15 +00:00