Commit Graph

4041 Commits

Author SHA1 Message Date
karlchillmaid
eb9768c91b Removed heading above radios
Removed heading above radios
2018-09-18 11:14:11 +01:00
karlchillmaid
02ad9ed0a3 Updated postage labels
Updated postage labels
2018-09-18 11:13:32 +01:00
karlchillmaid
a2a8496d52 Updated postage radio labels
Updated postage radio labels
2018-09-18 11:12:12 +01:00
karlchillmaid
c125e24432 Updated postage content
Updated postage content
2018-09-18 11:05:33 +01:00
Katie Smith
de9759b99a Add letter class row to settings page, visible to platform admin
Added a new row to the settings table, 'Post class', which shows the
default letter class of a service and is only visible to Platform Admin.

Also added a new page to enable Platform Admin users to change the
default letter class for a service - this only has two options at the
moment, 1st class only and 2nd class only.
2018-09-18 10:31:01 +01:00
Chris Hill-Scott
75be9e13af Mark agreement signed by Newcastle-under-Lyme 2018-09-17 11:50:51 +01:00
Chris Hill-Scott
8f2b51b428 Mark agreement signed by Ryedale council 2018-09-14 11:51:45 +01:00
Chris Hill-Scott
c800312281 Don’t attempt to store domain as empty string
When there is a uniqueness constraint on a DB column you can still have
multiple null values.

You can’t have multiple empty string values.

We are trying to save the domain as empty string when creating or
updating a new branding. This means that it’s currently not possible to
create or update a branding with no domain, because the uniqueness
constraint is violated.
2018-09-13 15:37:52 +01:00
Chris Hill-Scott
a9962d2a18 Merge pull request #2303 from alphagov/pending-status
Map ‘pending’ status to ‘sending’
2018-09-12 16:27:54 +01:00
Katie Smith
afeb0d44e2 Merge pull request #2304 from alphagov/346-362
Updated service and org count to 362 and 115
2018-09-12 10:36:04 +01:00
karlchillmaid
7c460302a0 Merge pull request #2270 from alphagov/add-document-download-guidance-to-template
Add 'send a document by email' guidance to email template formatting guidance
2018-09-12 10:11:54 +01:00
Pete Herlihy
8b6b7a39d1 Updated service and org count to 362 and 115 2018-09-11 16:55:10 +01:00
Chris Hill-Scott
c59142b871 Map ‘pending’ status to ‘sending’
For some reason we are getting pending back as a status from one of
our text message providers.

Because this is unrecognised by the admin app it shows up in the list of
messages as the raw status, styled like an error.

This commit maps it to sending instead, because the user doesn’t need to
know or care about the difference.
2018-09-11 13:46:33 +01:00
karlchillmaid
22b6b8f412 Added a reminder to upload the document
Added a reminder to upload the document using the API.
2018-09-10 14:47:22 +01:00
Chris Hill-Scott
3b889ec0fe Merge pull request #2299 from alphagov/friendlier-datetimes
Use friendlier relative dates for ‘last edited’
2018-09-10 11:55:11 +01:00
Chris Hill-Scott
87b6230ac3 Mark agreement signed by Stockport council 2018-09-07 15:55:18 +01:00
Alexey Bezhan
5198009550 Merge pull request #2300 from alphagov/submit-returned-letters
Add a platform admin page to submit returned letter references
2018-09-07 15:06:24 +01:00
Chris Hill-Scott
a9eb1c41d3 Merge pull request #2296 from alphagov/return-sent-by-in-csv
List who sent a message in CSV download
2018-09-07 13:26:10 +01:00
Chris Hill-Scott
94cd7c0899 Merge pull request #2291 from alphagov/remove-redundant-args
Remove redundant arguments to notification page
2018-09-07 13:26:03 +01:00
Chris Hill-Scott
09daf03ec9 Merge pull request #2290 from alphagov/link-to-notification
Link to single notification page from API integration page
2018-09-07 13:25:57 +01:00
Chris Hill-Scott
08d40526b8 Make sure brands with no name can still be clicked 2018-09-07 11:45:44 +01:00
Chris Hill-Scott
e45eca20c6 Revert "Require name when adding email branding" 2018-09-07 11:43:32 +01:00
Alexey Bezhan
b75681dfbc Add a platform admin page to submit returned letter references
A platform admin form accepts a list of references (one per line)
received from DVLA and sends them to the API to update notification
statuses.

References we get from DVLA start with `NOTIFY00\d`, which isn't
part of the reference we store in the database, so we remove them
before sending the data to the API.

The new `returned-letter` status should be treated as `delivered`
for now until we decide a way to display returned letters to users.
2018-09-07 11:13:01 +01:00
Chris Hill-Scott
c76b865d88 Use friendlier relative dates for ‘last edited’
Because ‘2 months ago’ is more human-sounding than ‘70 days ago’.

Using this pattern (borrowed from the API integration page) will also
use Javascript to keep the time updated, so ‘just now’ will turn into
‘1 minute ago’ without having to reload the page.
2018-09-06 16:19:41 +01:00
Chris Hill-Scott
afe6d04d96 Merge pull request #2298 from alphagov/no-html5-validation
Don’t use HTML5 validation on email branding form
2018-09-06 16:10:23 +01:00
Chris Hill-Scott
8978aa33c6 Don’t use HTML5 validation 2018-09-06 16:03:28 +01:00
Chris Hill-Scott
7010c0fbd5 Remove annoyances from email branding forms 2018-09-06 15:50:54 +01:00
Chris Hill-Scott
72ca78e824 Merge pull request #2294 from alphagov/no-canonical-magic
Validate non canonical domains
2018-09-06 15:34:11 +01:00
Chris Hill-Scott
06de2b145c Merge pull request #2293 from alphagov/fix-live-search-brand-select
Fix live search on email brand selection
2018-09-06 15:33:53 +01:00
Chris Hill-Scott
cc364c87a4 Merge pull request #2292 from alphagov/require-name-branding
Require name when adding email branding
2018-09-06 15:33:45 +01:00
Chris Hill-Scott
eb1bae3046 Merge pull request #2289 from alphagov/bl.uk
Add British Library domain
2018-09-06 15:33:26 +01:00
Chris Hill-Scott
20e71499f0 List who sent a message in CSV download
This is useful if you have lots of people sending messages and want to
report on who’s doing what.

Needs the API updating to return `created_by_name` in its response.
2018-09-06 14:52:31 +01:00
Chris Hill-Scott
34ed0da362 Validate non canonical domains
At the moment we transform what the user gives us, so if someone enters
`digital.cabinet-office.gov.uk` it will automagically be saved as
`cabinet-office.gov.uk`. This happens without the user knowing, and
might have unintended consequences.

So let’s tell them what the problem is, and let them decide what to do
about it (which might be accepting the canonical domain, or adding a
new organisation to domains.yml first).
2018-09-06 12:35:52 +01:00
Chris Hill-Scott
4fe3bbf380 Remove redundant arguments to notification page
This stuff doesn’t seem to be used anywhere.
2018-09-06 12:25:33 +01:00
Chris Hill-Scott
3ed0cc1437 Fix live search on email brand selection
At some point the element with a `class` of `brand-styles` was removed
from the page, meaning the search stopped working.
2018-09-06 12:02:40 +01:00
Chris Hill-Scott
1bd7df7797 Require name when adding email branding
Otherwise name can be blank and it never appears in the list, so you can’t find it again.
2018-09-06 11:53:30 +01:00
Chris Hill-Scott
e4341f5d5b Indicate messages sent with a test key
If a message has been sent with a test key it’s a bit confusing to just
say ‘Delivered’ on the page, because it hasn’t gone to anyone’s phone.

So this commit adds a bit of hint text to disambiguate what ‘Delivered’
actually means in this context.
2018-09-06 10:50:19 +01:00
Chris Hill-Scott
2ddf3d5cfe Link to notification from API integration
It’s useful to be able to see what the email or text message looks like,
especially if you’ve sent it with a test API key (so it isn’t in your
inbox or on your phone). We already have the page for this, so we just
need to link to it.
2018-09-06 10:50:18 +01:00
Chris Hill-Scott
d5a3ecd7d7 Add British Library domain 2018-09-05 11:22:09 +01:00
Chris Hill-Scott
2396a440f5 Add Kingston Council’s domain 2018-09-05 11:20:01 +01:00
Chris Hill-Scott
01fdcb8998 Use NHS.UK branding is for all NHS services
Anyone choosing ‘NHS’ for their organisation type gets should get the
NHS branding. We don’t want to hard-code an ID for NHS branding anywhere
because it won’t be consistent between environments.

So instead we can say that anyone who chooses ‘NHS’ as their
organisation type should get whatever branding has `nhs.uk` as its
domain.

This allows us to easily manage the branding the same way we do other
brands, but gives us the efficiency of having it auto applied.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
46dcaf3e54 Mark which brands are used as default on list
So that:
- we can see when a brand should be getting used as a default but isn’t
- we’re careful updating brands which will get auto-applied to new
  services
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
243fdb0260 Assign email branding based on user’s email domain
When a user creates a service we can take a pretty good guess at what
organisation they’re from.

For many organisations, especially local councils, GOV.UK branding is
not appropriate for their service. But right now every service:
- gets created with GOV.UK branding
- has to ask us to change it, even if they’ve already done so for other
  services they run

This commit starts using the `domain` field on the email branding table
to lookup what email branding to assign to a service automatically,
where we’re sure there’s a sensible default.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
2e7ae91029 Persist canonical domain in email branding
When saving an email branding it’s possible we might not enter the
canonical domain for an organisation into the domain field. Because
we’re going to use the canonical domain to look up the brandings this
will cause a mismatch.

Rather than validate this and show an error, let’s just save the correct
thing instead. From the user’s perspective this means everything will
just work (ie a user with a given email address will automatically get
the right branding for their organisation).
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
80423dfb3f Don’t allow adding unknown domains to branding lookup
We should make sure we’re not putting typos in the branding list. We can
validate what gets entered here against our known list of public-sector
domains.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
47c9b71fa8 Add canonical domain info to agreement class
Because we alias domains (eg `foo.gsi.gov.uk` to `foo.gov.uk`, or where
a local council has multiple domains) it could be hard to look up a
brand (which has one domain field).

Therefore we need a way of getting the canonical domain from a user’s
email address, which we can later use to look up their branding.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
d80b735b2b Refactor some of the logic into form
It’s messy having a lot of logic in the view methods. Handling the form
stuff can be better encapsulated inside the `Form` subclass itself.
2018-09-05 10:25:39 +01:00
Chris Hill-Scott
80801d827a Put the currently selected branding top of list
There’s something that feels a bit off about not being able to see the
name of the currently-selected branding when you land on the page.

Putting it at the top also means that you can easily switch back to it
if you change your mind.
2018-09-05 10:07:36 +01:00
Chris Hill-Scott
f387f1e6ba Merge pull request #2268 from alphagov/request-to-go-live-better-data
Make the data we get from the go live requests more useful
2018-09-04 16:25:59 +01:00
Chris Hill-Scott
b8eb7c324c Merge pull request #2279 from alphagov/cache-email-branding
Cache email branding in Redis
2018-09-04 14:51:54 +01:00