Commit Graph

7096 Commits

Author SHA1 Message Date
pyup-bot
154bfdd711 Update notifications-python-client from 5.2.0 to 5.3.0 2019-02-08 15:24:33 +00:00
Chris Hill-Scott
72a7d0d5d8 Merge pull request #2745 from alphagov/614-services
Updated the service and org counts
2019-02-08 15:23:04 +00:00
Pete Herlihy
7ae58f97e3 Updated the service and org counts 2019-02-08 15:14:45 +00:00
Chris Hill-Scott
60ad32bb8e Merge pull request #2743 from alphagov/reveal-full-precompiled-letter
Allow people to see the full precompiled letter
2019-02-08 12:01:30 +00:00
Katie Smith
f9a34768b6 Merge pull request #2744 from alphagov/letter-branding-list
Add '/letter-branding' page to show all letter brands
2019-02-08 09:36:57 +00:00
Chris Hill-Scott
6824eeebf5 Allow people to see the full precompiled letter
Sometimes people print stuff under where we’re folding the letter. It’s
annoying to not be able to see it.

This commit adds a little detail where, once you’ve sent the letter
you can unfolds the corner to see what’s underneath.

It’s better that we do this for all letters for discoverability.
2019-02-07 16:19:13 +00:00
Katie Smith
f78b3bff81 Add '/letter-branding' page to show all letter brands
This is a platform admin page which lists all letter brands and their
domain. Once the page to edit a letter brand has been created, each
brand will link to its edit page, but for now this is just a list of
brand names and domains.
2019-02-07 16:16:22 +00:00
Leo Hemsted
f87f89bfd2 Merge pull request #2734 from alphagov/set-letter-branding
Set letter branding for a service
2019-02-07 14:36:53 +00:00
Chris Hill-Scott
1efdf5e06c Merge pull request #2740 from alphagov/change-not-edit-postage
Say ‘Change’ not ‘Edit’ postage
2019-02-07 12:00:30 +00:00
Chris Hill-Scott
1b89b7d7da Merge pull request #2742 from alphagov/t…
Add tooltip to ‘Templates’ in breadcrumb
2019-02-07 12:00:22 +00:00
Leo Hemsted
f83910599c remove option for branding to sometimes not show search
it wouldn't show search if there were under a certain amount of letter
or email branding options - however we know there will always be more
than that amount so lets remove some complexity.

Also, rename the SearchTemplatesForm because it can search anything -
it just prompts you to search by name is all.
2019-02-07 11:39:23 +00:00
Leo Hemsted
7590b3dba9 remove unused sort_key param 2019-02-07 11:38:20 +00:00
Leo Hemsted
d5446774fa letter branding text fields should be optional 2019-02-07 11:38:20 +00:00
Leo Hemsted
5405c2e1be fix service settings letter branding tests
some tests are now expanded to handle the fact that letter branding
can be null
2019-02-07 11:38:20 +00:00
Leo Hemsted
3be82bafd5 fix request letter branding page
(it can now have a null type). also fix nav.py
2019-02-07 11:38:20 +00:00
Leo Hemsted
8266635a7a remove dvla_organisation and other unused things
dvla_organisation, branding_dict, a weird `branding` property on
update_service. all gone 💥
2019-02-07 11:38:20 +00:00
Leo Hemsted
a1caf77b0e use new letter branding instead of dvla organisation id
new code is copied stylistically from the email branding patterns.
Instead of `service.dvla_organisation`, there's now
`service.letter_branding` and `service.letter_branding_id`. However,
unlike email branding we're not currently showing a preview of the
logo. That can come later when we work out how we want to do it.
2019-02-07 11:30:18 +00:00
Leo Hemsted
0e20ca44a3 rename branding to email_branding
to help transition to having letter branding as well
2019-02-07 11:30:18 +00:00
Chris Hill-Scott
3d45f5b9c3 Add tooltip to ‘Templates’ in breadcrumb
Because sometimes we show it truncated to ‘T…’
2019-02-07 11:05:47 +00:00
Katie Smith
b81704ab69 Merge pull request #2719 from alphagov/create-letter-branding
Add platform admin page to create letter branding
2019-02-07 10:13:41 +00:00
Chris Hill-Scott
8e1ce9b191 Merge pull request #2738 from alphagov/leeds.gov.uk
Mark agreement signed by Leeds Leeds Leeds
2019-02-06 17:28:08 +00:00
Chris Hill-Scott
e45024affd Say ‘Change’ not ‘Edit’ postage
To match the call to action on the template page.

Karl said:

> I feel good about it. You're not really editing it so much as choosing between 2 options. It feels more human.
>
> I think it only started out as edit to match all the other sections of the letter – it certainly wasn't given any real consideration.
2019-02-06 17:27:32 +00:00
Katie Smith
bbc5eaa12f Handle the database errors on name and domain fields
Form errors were being shown (such as a domain not being a valid), but
we weren't showing nicely formatted error messages if the database
failed to save a new row.
2019-02-06 17:26:58 +00:00
Katie Smith
529d7df5f5 Add page to create new letter branding
This has a form with 3 fields - the file upload field, logo name, and an
optional logo domain. Logos need to be uploaded in `.svg` format and we
then convert this to `.png` format and upload both file types to S3 as
well as saving the letter branding details in the database.
2019-02-06 17:26:58 +00:00
Katie Smith
446b9ccbb2 Add create_letter_branding method to letter branding client 2019-02-06 17:26:58 +00:00
Katie Smith
b68d0722bb Fix mocks in existing s3 client tests
Some of the tests were calling methods that didn't exist on MagicMock
objects, which meant that they were always passing. For example, tests
using the format of MagicMock.called_once_with(...) were always passing
since a MagicMock does not have the method `called_once_with`. Changing
this to `assert_called_once_with` ensures that the tests fail if they're
called with the wrong arguments.
2019-02-06 17:26:58 +00:00
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