Commit Graph

7170 Commits

Author SHA1 Message Date
Katie Smith
d654a87f5c Rename the current s3 logo client functions
We will be adding methods to deal with letter logos, so this adds 'email' to
the method names for email logos to avoid confusion later.
2019-02-06 17:26:58 +00:00
Katie Smith
f005d7a569 Refactor to split s3_client.py into multiple files
Separated s3_client.py into 3 files - for logos, CSV files and the MOU.
This helps to keep things clearer now that we need to add lots more logo
functions for letters.
2019-02-06 17:26:58 +00:00
Chris Hill-Scott
5e6d48e50f Merge pull request #2739 from alphagov/sequential-gulp
Ensure Gulp tasks run sequentially
2019-02-06 16:24:26 +00:00
Chris Hill-Scott
0d3642148c Always pin to exact versions 2019-02-06 16:16:28 +00:00
Chris Hill-Scott
06a9e56589 Ensure Gulp tasks run sequentially
So that images are always copied into place before trying to build the
SASS.
2019-02-06 16:09:39 +00:00
Chris Hill-Scott
bffc215f8c Mark agreement signed by Leeds Leeds Leeds 2019-02-06 15:44:35 +00:00
Chris Hill-Scott
8f6c6e08e4 Merge pull request #2737 from alphagov/images-before-sass
Move images into place before processing SASS
2019-02-06 15:39:50 +00:00
Chris Hill-Scott
c6aba6569a Move images into place before processing SASS
As part of the SASS processing we base64 and embed every image found in
the SASS files. In order to do this the images need to be in place
beforehand.

This was causing a bug where the first deploy of an image would cause it
to 404.
2019-02-06 15:23:55 +00:00
Chris Hill-Scott
3cc2fd90bd Merge pull request #2736 from alphagov/show-postage-on-envelope
Show postage on envelope
2019-02-06 15:03:44 +00:00
Chris Hill-Scott
f2c7be57a4 Stop referring to service.postage
All templates have postage now and we will be getting rid of
`service.postage`.
2019-02-06 14:54:58 +00:00
Chris Hill-Scott
b98f73112d Remove existing display of postage
It’s redundant now we’re displaying it as part of the template.
2019-02-06 14:37:17 +00:00
Chris Hill-Scott
66b5d2ccc7 ‘Change’, don’t ‘Edit’ postage
Edit is more suitable for extended bits of text. Change is better for
something constrained or where there are only discrete choices
available.
2019-02-06 14:37:17 +00:00
Chris Hill-Scott
bfdca62f2d Move ‘change postage’ link
So it aligns with how we’re displaying postage on the template.
2019-02-06 14:37:16 +00:00
Chris Hill-Scott
cd70355db8 Display postage everywhere we display a letter
To avoid the problem of having confusing defaults, the postage is now
set explicitly on every template.

Putting the postage ‘inside’ the letter template makes the interaction
for changing it consistent with how other parts of the template are
added.

Plus everyone loves skeumorphism.
2019-02-06 14:37:16 +00:00
Chris Hill-Scott
ab8244ec5d Move ‘edit’ contact block link button
The contact block fills from the bottom upwards. So if it only has a few
lines then the ‘Edit’ link button sits quite far away from where the
text appears in the letter. This commit moves the link button to bottom
align with the contact block, so it’s always in close visual proximity.
2019-02-06 14:37:15 +00:00
Pea (Malgorzata Tyczynska)
2e6ebbd744 Merge pull request #2735 from alphagov/remove_choose_postage_feature_flag
Remove choose postage feature flag
2019-02-06 14:31:37 +00:00
Pea Tyczynska
b07f16b9a0 Don't use service default postage, but template postage instead 2019-02-06 11:40:50 +00:00
Pea Tyczynska
64aff0ba05 Remove choose_postage feature flag so everyone can choose postage 2019-02-05 17:21:15 +00:00
Pea (Malgorzata Tyczynska)
02ff79d0dd Merge pull request #2733 from alphagov/postage_changes_before_it_goes_public
People who can't send messages still see template postage class
2019-02-05 16:52:21 +00:00
Chris Hill-Scott
0fc4245b16 Merge pull request #2732 from alphagov/resend-wording
Refine wording of ‘already sent’ error
2019-02-05 15:19:24 +00:00
Chris Hill-Scott
d9e3a90123 Remove ‘You’ve’
It could be someone else who’s uploaded them.
2019-02-05 15:09:24 +00:00
Chris Hill-Scott
5a70587fe8 Refine wording of ‘already sent’ error 2019-02-05 14:59:21 +00:00
Chris Hill-Scott
27217f1ad1 Merge pull request #2731 from alphagov/fix-empty-message
Fix empty folder message
2019-02-05 14:55:26 +00:00
Chris Hill-Scott
ce04c9c45a Merge pull request #2725 from alphagov/job-sent-already
Warn if a file has been sent already
2019-02-05 14:55:08 +00:00
Chris Hill-Scott
975dce9f43 Merge pull request #2730 from alphagov/fix-hover-icon-ie10
Fix hover folder icon in IE10/11
2019-02-05 14:55:01 +00:00
Chris Hill-Scott
34f509af11 Fix empty folder message
Sometimes, when filtering the view by template type, the message was
saying the folder was empty, when really it should have been saying that
there were no templates of the ‘type’ you’re looking for, eg:
> There are no email templates in this folder

This was because it was looking at the filtered list of templates, not
all templates to determine whether a folder was really empty.
2019-02-05 14:28:11 +00:00
Chris Hill-Scott
e0d28cf1dd Fix hover folder icon in IE10/11
Duplicates e0ecc95ac6

Copies the code from the normal folder icon, and manually tweaks the
colour, to also get the benefits of minification.

***

IE 10 supports using SVG[1] but has some buggy behaviour when they’re
used as background images.

Without an explicit width/height it stretches the viewBox of the SVG to
fill the containing element. This causes the content of the file to
display centered within the viewBox.

Explicitly setting the width and height seems to be the thing that fixes
this. Out of the suggested fixes on Stackoverflow[2] this one seems to
be the most straightforward.

1. https://caniuse.com/#feat=svg
2. https://stackoverflow.com/questions/17944354/svg-background-image-position-is-always-centered-in-internet-explorer-despite-b
2019-02-05 13:50:39 +00:00
Chris Hill-Scott
311d615356 Merge pull request #2724 from alphagov/pyup-update-pytest-mock-1.10.0-to-1.10.1
Update pytest-mock to 1.10.1
2019-02-04 17:35:06 +00:00
Chris Hill-Scott
6be27459cd Merge pull request #2729 from alphagov/pyup-update-flake8-3.7.4-to-3.7.5
Update flake8 to 3.7.5
2019-02-04 17:34:59 +00:00
pyup-bot
9ae5a7c9ad Update flake8 from 3.7.4 to 3.7.5 2019-02-04 16:55:21 +00:00
Chris Hill-Scott
dc4668b51d Merge pull request #2722 from alphagov/southtyneside.gov.uk
Mark agreement signed by South Tyneside
2019-02-04 16:25:19 +00:00
Pea Tyczynska
2861a74d61 People who cant send messages see template postage class 2019-02-04 16:24:28 +00:00
Pea (Malgorzata Tyczynska)
84e458ba78 Merge pull request #2728 from alphagov/fix_edit_button
Fix bug that shows edit postage button on template to everyone
2019-02-04 16:01:15 +00:00
Pea Tyczynska
06bf6254e3 Fix bug that shows edit postage button on template to everyone 2019-02-04 15:54:07 +00:00
Tom Byers
04ca620f46 Merge pull request #2726 from alphagov/fix-incorrect-use-of-inarray
$.inArray returns the same value as Array.indexOf
2019-02-04 15:23:40 +00:00
Chris Hill-Scott
ca6529dcdb Update app/assets/javascripts/templateFolderForm.js
Use native `Array.indexOf` instead.

Co-Authored-By: tombye <tombaromba@gmail.com>
2019-02-04 15:17:27 +00:00
Pea (Malgorzata Tyczynska)
189eabbe2a Merge pull request #2695 from alphagov/postage_on_template_not_on_service
Edit postage per template and not through service settings
2019-02-04 15:04:25 +00:00
Tom Byers
0e55521d8f $.inArray returns the same value as Array.indexOf 2019-02-04 14:56:18 +00:00
Pea Tyczynska
6b9f0675d1 Change styling of 'back to template' link on edit template postage page 2019-02-04 14:55:16 +00:00
Pea Tyczynska
29a860cf96 Move a full stop so it's outside the link 2019-02-04 14:55:16 +00:00
Pea Tyczynska
fe6b73b8dc Remove service postage setting and choose_postage switch 2019-02-04 14:55:16 +00:00
Pea Tyczynska
20ae200de9 Remove choosing postage from edit template content flow 2019-02-04 14:45:33 +00:00
Pea Tyczynska
e85678fa69 Add link to edit postage to view_template page 2019-02-04 14:45:33 +00:00
Pea Tyczynska
db5378bac2 Edit template postage from a separate view 2019-02-04 14:45:33 +00:00
Chris Hill-Scott
88f9d156c7 Warn if a file has been sent already
We have some teams who haver a series of files they have to send each
day. It’s easy to get muddled up and accidentally send the same file
again, if you think you haven’t already sent it.

This commit blocks you from sending the same combination of template
version and filename more than once on the same day[1].

This won’t affect teams who re-use the same template to give (for
example) updates on an incident for business continuity. These teams
edit the template between each send, thereby updating the version
number of the template.

1. This is based on how the `limit_days` argument to the API works - you
can dig into the code here: 2bd4f74ad0/app/dao/jobs_dao.py (L50)
2019-02-04 14:44:54 +00:00
pyup-bot
cc392e49a4 Update pytest-mock from 1.10.0 to 1.10.1 2019-02-04 13:55:27 +00:00
Tom Byers
2055a83516 Merge pull request #2723 from alphagov/fix-polyfill-issue
Replace native Array.includes with jQuery version
2019-02-04 11:32:39 +00:00
Tom Byers
7ef32a6bd9 Replace native Array.includes with jQuery version
This was failing with a 'Object doesn't have
method' error on IE11. Assume Babel wasn't
polyfilling Array.includes so reverting to jQuery
version for now.
2019-02-04 11:23:41 +00:00
Chris Hill-Scott
0368b06d2d Mark agreement signed by South Tyneside 2019-02-04 10:52:37 +00:00
Chris Hill-Scott
3140eb22ab Merge pull request #2721 from alphagov/lancs-wrecs
Mark agreement signed by Lancashire and Wrexham
2019-02-04 10:51:02 +00:00