Commit Graph

3425 Commits

Author SHA1 Message Date
Imdad Ahad
6c377b0ecd Remove unused method 2017-04-20 15:20:02 +01:00
Imdad Ahad
99805fb592 Add extra flag to indicate we want a csv notification response 2017-04-20 15:18:47 +01:00
Imdad Ahad
19f42a8984 Refactor report download:
* Remove formatting (most performance intensive) as this will happen on API
* Remove buffering of notifications so we can yield them back straight away
* Refactor existing tests to match new format of the notification resp for csv
2017-04-20 15:18:42 +01:00
Leo Hemsted
2c3f588e42 Merge pull request #1233 from alphagov/template-service
add template preview service to cf manifest
2017-04-18 16:49:13 +01:00
Leo Hemsted
0850f5dd22 add template preview service to cf manifest 2017-04-18 16:43:55 +01:00
Leo Hemsted
4fcee5f216 Merge pull request #1224 from alphagov/letters-from-a-service
Letters from template-preview service
2017-04-18 15:56:24 +01:00
Leo Hemsted
ba6c6b4923 node requires brew to install 2017-04-18 14:04:10 +01:00
kentsanggds
c86e195911 Merge pull request #1231 from alphagov/letter-jobs-title
Add title to letter jobs page
2017-04-18 13:07:06 +01:00
Ken Tsang
6b1bce091b Add title to letter jobs page 2017-04-18 12:23:40 +01:00
Chris Hill-Scott
e775b2a181 Merge pull request #1230 from alphagov/fix-entities-in-subjects
Stop template subjects getting saved encoded
2017-04-18 10:34:10 +01:00
Chris Hill-Scott
bb45ab025e Merge pull request #1228 from alphagov/banner-spacing
Fix spacing on no permissions banner
2017-04-18 10:10:21 +01:00
Chris Hill-Scott
267b58a66d Stop template subjects getting saved encoded
This is another problem with sanitising HTML, this with with it getting
encoded where it shouldn’t be. The result was, when editing a template,
the API getting sent an encoded rather than raw version of the subject
(for letters and emails).

The reason this happened is because BeautifulSoup behaves in an
unexpected way.

When accessing the `value` attribute of an `input` BeautifulSoup returns
an unencoded version of the contents. In other words it returns what the
user would see in the page, not what is in the raw HTML of the page.

This meant that we were trying too hard to see an `&` instead of a
`&` in our tests[1]. So things were actually working fine before adding
the call to `escape_html`[2], but from the output of the tests it didn’t
look like HTML was getting escaped.

So this commit fixes the bug by removing the call to `escape_html` and
adding a test that looks at the raw HTML, to complement the existing
test which looks at just the `value` attribute.

1. Relevant test added here: https://github.com/alphagov/notifications-admin/pull/1178/files#diff-f2eb304b93cc383727c0ab7fc8fbd464R289
2. Call added here: https://github.com/alphagov/notifications-admin/pull/1178/files#diff-f0af582449ebf426f27f37e38f310057R252
2017-04-14 08:52:02 +01:00
kentsanggds
569cd93c49 Merge pull request #1229 from alphagov/redirect-letter-jobs-post
Redirect after letter-jobs post
2017-04-13 15:11:31 +01:00
Leo Hemsted
8c5ec33825 Merge pull request #1209 from alphagov/paas_failwhale
Add Paas failwhale app
2017-04-13 09:36:47 +01:00
Ken Tsang
b02df9ba4b Redirect after letter-jobs post 2017-04-12 18:19:55 +01:00
Leo Hemsted
d655a38e14 don't allow bad filetypes to preview 2017-04-12 12:12:11 +01:00
Chris Hill-Scott
685cce37bf Remove ‘mode’ banner type
No longer used anywhere.
2017-04-12 09:58:47 +01:00
Chris Hill-Scott
c14b860d0a Fix spacing on no permissions banner
Didn’t align with navigation.
2017-04-12 09:56:15 +01:00
Chris Hill-Scott
030a80c965 Merge pull request #1227 from alphagov/fix-checkboxes
Fix new checkboxes
2017-04-11 17:50:10 +01:00
Chris Hill-Scott
d58be228dd Fix new checkboxes
Problems:
- WTForms expects the value of checkboxes to always be `y` (they don’t
  work like radio buttons, which is where I copied this code for)
- WTForms `BooleanField`s don’t have a checked attribute, they set their
  data attibute to `True` or `False`
2017-04-11 17:47:16 +01:00
kentsanggds
04da9359ef Merge pull request #1223 from alphagov/letter-jobs-page
Letter jobs page
2017-04-11 17:30:40 +01:00
Chris Hill-Scott
c933b886d9 Merge pull request #1226 from alphagov/hover-state-new-radio-select
Add hover state for new radio select styles
2017-04-11 17:23:41 +01:00
Chris Hill-Scott
7fcabbc0e6 Add hover state for new radio select styles
Because they look like links, they should have all the clicking
affordance of links.
2017-04-11 17:22:44 +01:00
Leo Hemsted
a0470b40ea fix test syntax 2017-04-11 17:15:31 +01:00
Leo Hemsted
6d5f90eea2 Merge branch 'master' into letters-from-a-service 2017-04-11 17:11:51 +01:00
Chris Hill-Scott
cd926a46bc Merge pull request #1225 from alphagov/fix-radio-select-overflow
Fix overlapping UI with new radio buttons
2017-04-11 17:07:29 +01:00
Chris Hill-Scott
bde140f560 Fix overlapping UI with new radio buttons
Not sure what about the new radios is causing this, but they no longer
expand the size of the container, causing an overlap.

The fixed height was originally for performance reasons, but removing
it doesn’t seem to cause the page to jump around on load, so I think
it’s OK.
2017-04-11 17:05:02 +01:00
Ken Tsang
0f3131cf21 Refactor test_letter_jobs 2017-04-11 15:17:18 +01:00
Ken Tsang
9ce4ce8031 Add count and disabled checkbox until ready / dvla state 2017-04-11 15:02:20 +01:00
Chris Hill-Scott
53b10f14f6 Merge pull request #1222 from alphagov/toolkit-upgrade
Upgrade GOV.UK Template, Frontend Tookit, and Elements
2017-04-11 14:03:08 +01:00
Chris Hill-Scott
3fceab3bc1 Merge pull request #1221 from alphagov/letter-edit-width-final
Increase width of edit letter textbox
2017-04-11 14:03:02 +01:00
Sakis
5b2e677127 Fix formatting in README 2017-04-11 13:01:50 +01:00
Athanasios Voutsadakis
51617658dc Add README.md for the failwhale 2017-04-11 12:58:35 +01:00
Rebecca Law
39dd969d5c Merge pull request #1214 from alphagov/refactor-s3-upload
Refactor s3upload.
2017-04-11 11:15:51 +01:00
Ken Tsang
e5a377edd8 Add letter jobs page, client and test 2017-04-11 10:59:50 +01:00
Leo Hemsted
9391181b2c Add cloudfoundry config values
also added tests
2017-04-10 19:25:08 +01:00
Leo Hemsted
a6318f2674 remove pdf/png code from admin app entirely
while PDFs work on paas, they only do that because it turns out the
python buildpack happens to have imagemagick preinstalled - if that
ever changes then it'd break. so move those to the template preview
service. This also means we can get rid of weazyprint and wand
dependencies
2017-04-10 17:45:22 +01:00
Leo Hemsted
64d162d96e Generate letter previews in the new notifications-template-preview service
by calling through to this, we no longer require admin app to ship
with binary dependencies (imagemagick/cairo/etc)
2017-04-10 16:06:34 +01:00
Rebecca Law
c9a519dac7 Update the version of notification-utils. 2017-04-10 15:41:57 +01:00
Chris Hill-Scott
ec33f843ef Use small font sizes in tables by default
GOV.UK Elements changed tables to be a larger font size here:
https://github.com/alphagov/govuk_elements/pull/185

This is good in principle (and a lot of our tables are 19px already).
However, the ones that aren’t are still 16px because there’s a lot of
info to fit on the page (eg when previewing someone’s CSV file).
2017-04-10 14:54:28 +01:00
Chris Hill-Scott
f7f0128f0c Remove button padding override
Not sure why we were doing this. But as part of the Elements upgrade
our back buttons got bigger (because they weren’t constrained by the
line in our `app.scss`) but any green submit buttons stayed smaller in
height, so didn’t line up.

This commit removes the override, so all buttons have the size that
Elements intended.
2017-04-10 14:54:28 +01:00
Chris Hill-Scott
8d5af47620 Change class names for validation errors in html
Implements the class name changes detailed in:
https://github.com/alphagov/govuk_elements/pull/405
2017-04-10 14:54:27 +01:00
Chris Hill-Scott
87c81c994f Ensure disabled radio buttons are still legible
The Elements CSS was making the `label` and `input` of disabled radio
buttons `opacity: 0.5`. This was resulting in text that was:
- too pale, especially where we were nesting 16px ‘hint’ text inside the
  label
- waaaay too pale when inside a link inside the label

This commit overrides elements to dim the disabled radio button by
making it’s text colour grey, rather than making the whole thing
semi-transparent.
2017-04-10 14:54:27 +01:00
Chris Hill-Scott
a592898eff Make radio select work w/ new checkboxes/radios
The visual appearance of radio and checkbox form inputs changed in
GOV.UK Elements here:

https://github.com/alphagov/govuk_elements/pull/296

This was subsequently reimplemented with different markup and no
Javascript here:
https://github.com/alphagov/govuk_elements/pull/406

This has meant making the following changes to our app:
- changing the markup in our radio/checkbox macros to match the example
  markup given by GOV.UK Elements
- removing the previous Javascript file because it’s no longer needed to
  make the radios appear visual selected
- making the buttons on the scheduled job picker look like links,
  because the grey button style looked weird with the new radio buttons
2017-04-10 14:18:12 +01:00
Chris Hill-Scott
31d03acc11 Remove external link styling
The external link icon, and associated mixin, were deprecated in
https://github.com/alphagov/govuk_frontend_toolkit/pull/293

This means we can’t and shouldn’t use them any more.
2017-04-10 14:16:45 +01:00
Chris Hill-Scott
e62bd2a018 Remove override to make beta banner blue
Previously the beta bar was orange, which we didn’t want. So we wrote
some SASS to make it blue.

Now that GOV.UK Frontend Toolkit makes it blue, we can remove this SASS.

See https://github.com/alphagov/govuk_frontend_toolkit/pull/370
2017-04-10 14:14:53 +01:00
Chris Hill-Scott
bb9fe35ab5 Upgrade GOV.UK toolkit, template and elements
We should make sure that the parts of the UI that we inherit from these
packages are kept up to date.

This commit:
- updates each dependency to the latest version
- makes patch (bug fixing) version bumps automatic because
  - it makes less work for us
  - we don’t get so far behind
  - we should be able to trust dependencies that are coming from other
    teams in this building

Full changes that this brings in:

GOV.UK Template
---

- Increase skiplink colour contrast ([GOV.UK Template PR #263](https://github.com/alphagov/govuk_template/pull/263))

GOV.UK Elements
---
- Too many to show – see
  https://github.com/alphagov/govuk_elements/compare/v1.1.1...v3.0.2#diff-4ac32a78649ca5bdd8e0ba38b7006a1e

GOV.UK Frontend Toolkit
---
- Too many to show – see
  https://github.com/alphagov/govuk_frontend_toolkit/compare/v4.6.0...v5.2.0#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
2017-04-10 14:02:41 +01:00
Rebecca Law
4d49fabcdd Merge branch 'master' into refactor-s3-upload
Conflicts:
	requirements.txt
2017-04-10 11:44:56 +01:00
Rebecca Law
80a82cfdab Update notifications-utils to the latest version 2017-04-10 11:43:45 +01:00
Chris Hill-Scott
80898e350e More tweaks to width of elements
- SMS message preview gets slightly wider so it lines up with a 4/8
  column
- Edit email box gets wider to match more closely the width of the
  previewed and delivered emails
2017-04-10 10:28:27 +01:00