Commit Graph

3435 Commits

Author SHA1 Message Date
Imdad Ahad
c370b8dfd2 Merge pull request #1238 from alphagov/44-46
44 to 46 for 2 new MOJ services
2017-04-21 17:35:19 +01:00
Imdad Ahad
341143451b Merge pull request #1236 from alphagov/fix-csv-download-timeout-issue
Fix CSV download timeout issue
2017-04-21 17:11:48 +01:00
Pete Herlihy
720ea941f4 44 to 46 for 2 new MOJ services 2017-04-21 16:53:56 +01:00
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
Chris Hill-Scott
38fbc3c47d Merge pull request #1235 from alphagov/fix-button-padding-product-page
Fix button padding on the product page
2017-04-20 15:18:20 +01:00
Chris Hill-Scott
baa2ff9332 Fix button padding on the product product-page
It’s uneven ever since we upgraded the toolkit. Guess it’s probably
allowing space for an arrow image. But I don’t like the arrow image
because it looks like it’s pointing at the ‘or sign in’ link.

So this commit overrides the button’s default spacing.
2017-04-20 15:03:38 +01:00
Chris Hill-Scott
76c1de1460 Merge pull request #1232 from alphagov/move-delete-link
Move delete link from the edit template page to the view template page
2017-04-20 14:18:35 +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
Chris Hill-Scott
5b763d935a Remove template type parameter on redirect
This is a hangover from when we had separate email/SMS template pages.
If the view doesn’t use a parameter Flask adds it to the querystring. So
we were getting URLs that ended in `?template_type=sms`, to no effect.
2017-04-18 13:49:01 +01:00
Chris Hill-Scott
c887c3d5b2 Add more spacing under the flash banner
It was a bit too close to the page title, just felt like it needed room
to breathe.
2017-04-18 13:49:01 +01:00
Chris Hill-Scott
ac948ceb19 Make delete link flush left when there’s no button
The delete link was designed to be used with a button, where it needs
some padding to separate it from the button.

We now have a case where it’s being used without an accompanying button,
so we need a variation without that padding.
2017-04-18 13:49:01 +01:00
Chris Hill-Scott
d5b78fac17 Move delete link from edit to view template page
Users were having trouble finding the delete template link. It sort of
made sense having it on the edit page before we had the view template
page. But it doesn’t make sense now – having to choose to ‘edit’ the
template before you can delete is counterintuitive.

The single template page is where you go to choose an action to perform
on your template. Deleting is a good example of an action you can
perform on a template.

So this commit moves the delete link from the edit template page to the
view template page.

It also puts the confirm banner on same page as the delete link

The idea being that, in order to make a decision about whether to delete
the template, it’s useful to be able to see the template you’re
deleting. There’s no user need to edit the template before you delete
it.
2017-04-18 13:47:36 +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