Commit Graph

5673 Commits

Author SHA1 Message Date
Chris Hill-Scott
68c9147fec Merge pull request #3119 from alphagov/retire-old-static-content
Retire old static content pages
2019-09-23 13:19:01 +01:00
Chris Hill-Scott
56772533e6 Replace negative contraction with Cannot
In accordance with style guide
2019-09-18 14:21:25 +01:00
Chris Hill-Scott
20f857753a Use constants for organisation type
This reduces the chances of making a typo, because doing so will raise
an exception rather than fail silently.
2019-09-16 11:33:50 +01:00
Chris Hill-Scott
077dc194c6 Tell people to change their branding
In some cases it’s not appropriate for teams to have GOV.UK branding.
But they all start with it by default, if we can’t make a better guess.
We should be more explicit about this to reduce the number of teams
sending emails with the wrong branding.
2019-09-16 11:21:28 +01:00
Chris Hill-Scott
86e3da043f Remove old branding illustrations
These aren’t used any more.
2019-09-16 11:21:07 +01:00
Chris Hill-Scott
59ab064185 Play back current branding
We get a few tickets at the moment where people are asking for the
branding they already have.

We think that playing back the name of the branding on this page should
reduce how often that happens.
2019-09-16 11:20:23 +01:00
Chris Hill-Scott
afcdedf598 Allow elaboration when ‘something else’ is chosen
Letting people input a bit of free text should reduce the amount of back
and forth we have to do over support tickets when setting up someone’s
branding.

If something else is the only option then we don’t show the radio button
at all and have just the free text input on the page (not behind a
progressive disclosure).
2019-09-16 11:18:22 +01:00
Chris Hill-Scott
6d0d10e8de Only show relevant choices of email branding
Users who work in local government can’t have GOV.UK branding on their
emails. And only those working for Companies House (for example) can
request the Companies House branding.

This commit adds:
- new choices of email branding, which offer the name of the branding,
  rather than the style
- logic to filter this list to only the applicable options, based on
  what we know about the user, service and organisation

This is a change from the previous approach which put the onus on users
to figure out the style of branding they wanted, when we might already
know that a lot of the options weren’t available to them, or would be
inconsistent with the branding of other services in their organisation.
2019-09-16 11:03:52 +01:00
Chris Hill-Scott
29a0611e42 Refactor organisation branding into model
This is the same way we handle lazy-loading the branding in the service
model.
2019-09-16 11:02:34 +01:00
Katie Smith
81da8e762d Update for new template preview sanitise response 2019-09-12 09:54:36 +01:00
Katie Smith
79053dec93 Allow uploaded letters to be sent if valid
Added a send button which only appears on the page if the query string
indicates that the PDF is valid. Before actually sending, we check that
the service has the right permissions and that the metadata for the
letter confirms the letter is valid (because the query string can be
changed).
2019-09-12 09:54:36 +01:00
Katie Smith
7368245c9a Show letter preview once file is uploaded
This shows the sanitised letter preview if the file had no validation
errors or the preview with the overlay if it failed validation.
2019-09-12 09:54:36 +01:00
Katie Smith
8a322b844b Sanitise uploaded letters and store in S3
This sanitises uploaded letters and stores the sanitised result in S3
with if it passes validation or the original PDF in S3 if validation
fails. A metadata value of 'status' is set to either 'valid' or
'invalid'.
2019-09-12 09:54:36 +01:00
Katie Smith
5fa9e071c7 Add check that PDF file can be opened and is not malformed
This checks that the PDF file is not malformed in some way (e.g. by
missing the EOF marker). We check this by trying to get the page count
of the letter which will be needed to display the preview of the letter.
2019-09-12 09:54:36 +01:00
Katie Smith
a103dbf801 Add max file size check when uploading a letter 2019-09-12 09:54:36 +01:00
Katie Smith
be6b5b922a Add virus scan stage when uploading a letter 2019-09-12 09:54:36 +01:00
Katie Smith
c577416866 Add letter upload form which redirects to blank preview page
Added a form to upload a single letter. Currently this only uses the
form to validate that a file is submitted and that the file is a PDF. If
either of these validations fail, the form will display an error.
Otherwise, we redirect to a new preview page which just has the filename
as the heading for now.
2019-09-12 09:54:36 +01:00
Chris Hill-Scott
47d5593f5f Merge pull request #3114 from alphagov/no-ie8
Remove code specific to IE8 and below
2019-09-11 11:14:27 +01:00
Chris Hill-Scott
8b8893ed1d Let NHS Trusts and CCGs choose own organisation
All we do via support is ask which organisation they work for and
manually assign their service to it. This commit makes that process self
service.

We think we have all the trusts and clinical commissioning groups
loaded into the database now.

This will make the go live process smoother for these teams.
2019-09-06 16:26:51 +01:00
Chris Hill-Scott
d37566a79b Merge pull request #3117 from alphagov/gp-self-define
Let GP surgeries create their own organisations before going live
2019-09-06 16:24:25 +01:00
karlchillmaid
71fe13652d Change 'the' to 'our'
Change 'the' to 'our' for consistency
2019-09-05 16:55:30 +01:00
karlchillmaid
9e79f5bd75 Add 'API' to the link for clarity 2019-09-05 16:47:28 +01:00
karlchillmaid
0ca4b892dd Update link content
Update link content to set user expectations about where the link will take them.
2019-09-05 16:46:25 +01:00
Chris Hill-Scott
b67ea7f268 Retire old static content pages 2019-09-05 16:25:15 +01:00
Chris Hill-Scott
fcb6f87d8b Make h1 consistent from page to page 2019-09-05 15:18:30 +01:00
Chris Hill-Scott
e0ab43f988 Let GPs nominate service name
Most GP practice services are named after the practice, which is the
organisation.

So rather than make people re-type the name of their organisation (and
potentially make a typo) let’s just let them say ‘yes, that’s the name
of my organisation’.
2019-09-05 15:01:12 +01:00
Chris Hill-Scott
daeefefeaa Let GP surgeries create their own organisations
We have a bunch of GP surgeries who want to go live. They don’t
automatically assigned to organisations. So this means a lot of back and
forth to get these organisations set up, and then the service has to
re-request to go live, and… it’s painful.

Instead, let’s let GPs create their own organisations, by confirming the
name of their organisation before going on to letting them accept the
agreement.
2019-09-05 15:01:12 +01:00
Chris Hill-Scott
d41effe8ce Allow GPs to click through to the agreement
We want GPs to be able to accept the agreement online. But at the moment
they don’t get automatically assigned to organisations. So we need to
let them enter the agreement accepting journey even if they don’t have
an organisation set up.
2019-09-05 14:46:02 +01:00
Tom Byers
9d8fcf34fc Fix variable assignment
Without the `var` prefix this was making
`$submitButton` a global variable, which is not
what the code intended.
2019-09-05 10:52:13 +01:00
Chris Hill-Scott
df2742f797 Only serve Javascript to users of IE9 and above
Our Javascript errors in older versions of IE anyway, so we might as
well save people some bandwidth and page load speed by not serving it to
them.
2019-09-05 09:51:01 +01:00
Chris Hill-Scott
cc713b4057 Remove code specific to IE8 and below
Our usage for these browsers in the last month is down to 0.2% of all
users, or 14 individual users, according to Google Analytics.

These users also visit about half the number of pages per sessions,
suggesting that they’re not signed in.
2019-09-03 10:10:27 +01:00
Chris Hill-Scott
2fe7887ec6 Merge pull request #3113 from alphagov/remove-expanded
Update utils to remove toggle for expanding email previews
2019-09-03 09:15:28 +01:00
Chris Hill-Scott
40e020d40d Remove expand_emails argument from get_template
It isn’t used for anything now.
2019-09-02 17:04:53 +01:00
Chris Hill-Scott
17b8c0194b Update utils and remove expanded argument
This argument was removed in https://github.com/alphagov/notifications-utils/pull/643
2019-09-02 17:04:53 +01:00
Leo Hemsted
0cf1251cad Merge pull request #3101 from alphagov/billing-for-all-services-report
Usage for all services
2019-09-02 16:38:23 +01:00
karlchillmaid
f2611f61b8 Update app/templates/partials/templates/guidance-send-a-document.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-09-02 15:48:27 +01:00
karlchillmaid
a94ca9082c Remove comment-out
Because we've added 'Send a document' content to all client docs and we added channel-specific features pages with 'Send files by email' content, we're going to reintroduce the instructions that were commented out as part of https://github.com/alphagov/notifications-admin/pull/2270
2019-09-02 15:30:34 +01:00
Tom Byers
af689d4ac3 Merge pull request #3108 from alphagov/remove-expand-collapse-js
Remove expandCollapse JS
2019-08-30 14:29:34 +01:00
Tom Byers
26e1e3a5cb Remove CSS tied to .js-enabled class
Not as obviously connected to expandCollapse but
no longer needed.
2019-08-30 08:44:14 +01:00
Chris Hill-Scott
13a98a73c1 Set free allowance for GP surgeries
This also tests that a user from an unknown organisation can pick any
of the available options and get the right allowance.
2019-08-29 17:47:14 +01:00
Tom Byers
c9c3f90fd8 Remove CSS used by expandCollapse.js 2019-08-29 16:42:47 +01:00
Tom Byers
030979a864 Remove expandCollapse.js script and refs to it 2019-08-29 16:42:27 +01:00
Tom Byers
9d176d8d8d Merge pull request #3093 from alphagov/fix-aria-on-fullscreen-table
Change method of hiding extra table layer
2019-08-29 14:01:54 +01:00
Leo Hemsted
6412a4ab33 use a flash error message on the platform admin usage report
that makes more sense than attaching the error to a field

also fix tests and assert csv contents are correct
2019-08-29 10:49:38 +01:00
Chris Hill-Scott
c9a32c7327 Remove duplication of org type lookup
There’s a couple of places where we’re looking up the label for the type
of organisation.

Having this repeated in multiple places means it’s more likely we forget
to update one of these places when making a change.

This commit looks up from the tuple in the organisation model, which is
where other code references this stuff from. This is only possible now
that we don’t have duplicate keys (ie GP practice doesn’t share a key
any more).
2019-08-28 15:36:09 +01:00
Chris Hill-Scott
38c2b32fa8 Add ‘GP’ as an organisation type
Although their allowances are the same as what we call `nhs_local` it
makes more sense to store them separately because:

- we already present them as two separate choices to the user
- we may want to handle them differently in the future, eg in terms of
  what branding choices are available to them

Once the API is updated we can start passing in this new value from
the admin app.
2019-08-28 15:36:09 +01:00
Chris Hill-Scott
efabf0e87d Refactor to avoid redefinition of org types
We’re defining the list of org types in a few different places. This
makes it more likely we’ll forget to update one of these places, thereby
introducing a bug.

This commit moves the definition to be on the organisation model, which
feels like a sensible enough place for it.
2019-08-28 15:36:08 +01:00
Rebecca Law
2fe5c4a96e New report on platform-admin/reports page to get the usage for all services. 2019-08-23 17:14:04 +01:00
karlchillmaid
4c232a9cab Fix h2 tag so heading displays properly 2019-08-23 14:16:23 +01:00
karlchillmaid
0d7005094a Merge pull request #3099 from alphagov/update-receive-text-message-content
Update explanation of inbound SMS
2019-08-23 14:13:54 +01:00