Commit Graph

2861 Commits

Author SHA1 Message Date
Pea Tyczynska
c3b7481e11 Turn on redirects for check_and_resend_text_code
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 11:49:48 +01:00
Pea Tyczynska
d089424501 Forgot password sends redirect link
with reset password email.

This is so when users reset their password they are still
redirected to pages they were meant to visit.

This change was done specifically so everyone who is meant to see
broadcast tour sees it, but it will improve lives of all users
who wanted to visit a page on Notify but then had to reset
their password in the process.
2020-10-05 16:58:43 +01:00
Pea Tyczynska
ab10009e4d Redirect link included in links for password reset
on sign-in page.
2020-10-05 15:38:34 +01:00
David McDonald
1b310a0f8a Merge pull request #3663 from alphagov/separate-tour
Move intro to Notify tour into separate views to reduce code complexity
2020-10-05 09:53:33 +01:00
David McDonald
c1f67514a2 404 for step-0 2020-10-02 14:44:17 +01:00
David McDonald
1f900e74a9 Fix error case where the tour start page is skipped
This was causing us to key error for 'placeholders' being missing in the
session dictionary. This fixes it and sends you back to the start
2020-10-02 12:46:02 +01:00
David McDonald
6f8a2721d9 Tighten restrictions of which templates a user can tour with
We don't want them being able to tour with a template they don't have
folder permissions to see.

Also, when a new user creates a service they will always have full
permissions so this won't affect new services at all, it's just to stop
people 'hacking' the urls to enable them to see templates they maybe
shouldn't see if they knew the template ID
2020-10-02 12:46:02 +01:00
David McDonald
ec0af6b151 Redirect user to new tour after creating a service
We leave the existing tour routes available for the moment so we don't
break the flow for anyone whilst this deploys
2020-10-02 12:46:02 +01:00
David McDonald
f0a8c97eeb Add check tour notification page
On submit of form on this page, will continue to normal sending flow
which can be shared code as there is no longer previous context needed
of where they have come from
2020-10-02 12:46:02 +01:00
David McDonald
9347c9a979 Redirect to the new check tour notification page
After the steps have been completed, redirect them to the new check tour
notification page to review their message
2020-10-02 12:46:02 +01:00
David McDonald
c2a691e6d9 Add view for filling in steps of the tour
Note, we choose to start our urls at step-1 rather than step-0 as this
is consistent when you would enter the first placeholder (excluding the
recipient) for the one off tour.

Also note, we expect a service to allow international sms by default
when it is first created but we keep the check for if the service does
just in case they visit this tour later on.
2020-10-02 12:46:02 +01:00
David McDonald
2ba7224a42 Add view for new tour start page
This will replace the current tour start page
2020-10-02 12:46:02 +01:00
Chris Hill-Scott
a98e3534b2 Give email preview page a sensible page title
It’s derived from the subject line of the email now as of
https://github.com/alphagov/notifications-utils/pull/793
2020-09-30 11:29:13 +01:00
Chris Hill-Scott
9becb2b817 Merge pull request #3641 from alphagov/area-suggestions
Suggest previously-used areas when adding new area
2020-09-23 15:00:21 +01:00
Tom Byers
cbb435b013 Merge pull request #3644 from alphagov/add-accessibility-statement
Add accessibility statement
2020-09-23 14:02:27 +01:00
Chris Hill-Scott
dcd48f99dd Merge pull request #3632 from alphagov/training-broadcast-approved
Add a tour screen once a broadcast is approved
2020-09-23 11:07:03 +01:00
Chris Hill-Scott
f50ef84c0d Suggest previously-used areas when adding new area
If you’re adding another area to your broadcast it’s likely to be close
to one of the areas you’ve already added.

But we make you start by choosing a library, then you have to find the
local authority again from the long list. This is clunky, and it
interrupts the task the user is trying to complete.

We thought about redirecting you somewhere deep into the hierarchy,
perhaps by sending you to either:
- the parent of the last area you’d chosen
- the common ancestor of all the areas you’d chosen

This approach would however mean you’d need a way to navigate back up
the hierarchy if we’d dropped you in the wrong place. And we don’t have
a pattern for that at the moment.

So instead this commit adds some ‘shortcuts’ to the chose library page,
giving you a choice of all the parents of the areas you’ve currently
selected. In most cases this will be one (unitary authority) or two
(county and district) choices, but it will scale to adding areas from
multiple different authorities.

It does mean an extra click compared to the redirect approach, but this
is still fewer, easier clicks compared to now.

This meant a couple of under-the-hood changes:
- making `BroadcastArea`s hashable so it’s possible to do
  `set([BroadcastArea(…), BroadcastArea(…), BroadcastArea(…)])`
- making `BroadcastArea`s aware of which library they live in, so we can
  link to the correct _Choose area_ page
2020-09-22 17:33:04 +01:00
Tom Byers
a75cde039f Merge pull request #3624 from alphagov/add-accessible-letter-specification
Add accessible letter specification
2020-09-22 16:36:15 +01:00
Chris Hill-Scott
2d64306e88 Link to specification page, not PDF directly 2020-09-22 15:49:38 +01:00
Chris Hill-Scott
a384f4cace Add route for letter specification page 2020-09-22 15:36:20 +01:00
Tom Byers
5241ea3ef0 Add basic page for accessibility statement 2020-09-22 11:46:57 +01:00
Leo Hemsted
a6b25b5991 add back links
previously the back link went to choosing a library.

Now, if you view a district from a county, go back to the county page.
Otherwise, go back to the top level of the library.
2020-09-21 11:24:05 +01:00
Chris Hill-Scott
5c22bd56ce Add a tour screen once a broadcast is approved
For a training broadcast the user doesn’t get that immediate feedback
that something has happened, like they would with a real alert, or even
sending themselves a text message.

This commit adds another tour-style page which will interrupt their
journey and hopefully reinforce the message we’ve given them earlier in
the tour.

We’re adding this because we’ve found in research that users don’t have
a good grasp of the consequences and severity of emergency alerts,
versus regular text messages.
2020-09-21 09:41:19 +01:00
Chris Hill-Scott
f824b3a5eb Give specific error if international letters off
If a service doesn’t have permission to send international letters but
someone tries to upload a letter with a valid international address we
just tell them that the last line must be a UK postcode.

This is a bit opaque and:
- suggests that we’re not recognising at all that it’s not a UK letter
- doesn’t explain why it must be a UK postcode

This commit adds a new, error message which tells users why their letter
can’t be sent. And hopefully will give them a better idea of how to
resolve the problem, if they really do need to be able to send
international letters.
2020-09-10 11:25:17 +01:00
Leo Hemsted
256d2b2b60 add counties page
What was previously ward -> local authority is now a ward -> local
authority -> county. County only covers rural counties and not
metropolitan boroughs and other unitary authorities. Previously, there
was a page full of local authorities (unitary authorities and
districts), and each one of those would have a list of electoral wards.
However, now there are counties that contain a list of districts - so
this needs a new page - a checkbox for "select the county" and then a
list of links to district pages.

If you want to select multiple districts, you'll need to go into each
one of those sub-sections in turn and click select all.

Needed to tweak the query to retrieve the list of areas in a list for a
library. Previously, it just returned anything at top level (ie: didn't
have a parent). However, rural districts now have parents (the rural
counties themselves). So the query now returns "everything that isn't a
leaf node", or in more specific terms, everything that has at least
other row referring to it as a parent. So no electoral wards, since
they dont have any children, but yes to districts and counties.
2020-09-09 14:39:12 +01:00
Chris Hill-Scott
0459e26be9 Show address line 7 not postcode in example spreadsheet
Since the letter preview will now show address line 7, the example
spreadsheet we give should match.
2020-09-07 12:00:27 +01:00
Rebecca Law
52954191fa Merge branch 'master' into international-letters-form 2020-09-07 09:45:17 +01:00
Tom Byers
676a9297fe Merge pull request #3593 from alphagov/fix-link-and-button-text-across-pages
Fix link and button text across pages
2020-09-01 15:11:09 +01:00
Pea Tyczynska
e0faad6cea Only approved email domain users can be invited
to broadcast services. This is done to improve security.
2020-08-28 14:41:03 +01:00
Chris Hill-Scott
dbfe293b4e Improve pacing and sequence of information in the broadcast tour
This commit refines which information we show on each page.

Specifically we’re
- adding some wording (‘at exactly the same time’) to try to communicate
  the immediacy
- giving the ‘loud noises’ message it’s own screen to really draw
  attention to it
- moving the ‘no phone numbers bit’ later in the journey, and
  experimenting with explaining why that is, to make it clearer how it’s
  different to a text message
2020-08-26 16:42:52 +01:00
Tom Byers
f608d5e979 Add context to banner button text
Needs flash messaging system changes.
2020-08-25 20:52:21 +01:00
Chris Hill-Scott
d3f6f2b7a4 Merge pull request #3588 from alphagov/broadcast-tour-rework
Refine the broadcast tour based on what we’ve learned in research
2020-08-24 14:28:34 +01:00
Chris Hill-Scott
8578e64cc9 Refine broadcast tour based on research learnings
We’ve shown the broadcast tour to a few users now. We’ve learned what
concepts about broadcasting are and aren’t getting through.

So what we’re emphasising here is:
- the thing that appears on the phone (the ‘emergency alert’) not the
  technology (a ‘broadcast’)
- how it’s different to other channels of messaging, eg text

We’ve generally spent a lot more time on the content and illustrations
this time around, so overall it’s should be clearer and shorter.

This also expands the communication of training mode into the header,
so it’s visible on every page (we can add another one for ‘live’
services later on).
2020-08-24 12:32:40 +01:00
Chris Hill-Scott
6131f6c6aa Replace ‘broadcast’ with ‘alert’ on dashboard
We’re moving away from ‘broadcast’ as a noun, so this commit updates the
dashboard to be in line with changes in other PRs.
2020-08-24 12:04:06 +01:00
Chris Hill-Scott
1acc3b55eb Merge pull request #3581 from alphagov/remove-end-time
Remove choice of ‘End time’ from broadcast journey
2020-08-19 14:30:22 +01:00
Chris Hill-Scott
da8321863d Remove choice of ‘End time’ from broadcast journey
Since we added the end time picker:
- we have discovered that broadcasts can’t be longer than 24h
- we have observed that most users confuse picking the end time for
  scheduling the message, or don’t understand exactly what it means for
  the broadcast to ‘end’
- we’ve developed the concept of ‘training mode’, which you should be
  going through before sending a real broadcast

We also think that, for most scenarios, you won’t necessarily know when
a broadcast should end at the time of starting it because the cause of
the danger is not within your control. So giving you control of the
end time before the broadcast has even been approved is a confusing
distraction.

Having to pick a time at all also makes the whole process feel more
planned and less immediate. Whereas in reality all the phones in the
area will be getting the message in seconds. It’s only people coming
into the area later to whom the ‘ongoing’ aspect of the broadcast
applies.

The best place to explain what’s happening with the phones is at the
approval stage and once you’ve sent your first (training mode)
broadcast. It’s easier to explain what’s happened if it’s in direct
response to something you’ve just done.

Later on we should add some kind of email reminder after 12 hours to
make sure you still want the broadcast live, again after 18 hours, etc.

We could let you schedule an end time once the broadcast is live, but
don’t think there’s a strong need. Knowing enough that you want to
cancel is one thing, but knowing enough to want to cancel but wanting to
wait a bit… nah.
2020-08-19 11:05:13 +01:00
Katie Smith
895a9df55a Add confirmation banner when cancelling user invites
This shows the green banner with a tick when cancelling a user's
invitation to a service or organisation. The accessibility audit noted
that 'When cancelling an invite a new page loads, however, there is no
immediate indication that the invite has been cancelled.'

In order to display the invited user's email address as part of the
flash message, this adds new methods to the api clients for invites to get
a single invite.
2020-08-19 09:05:41 +01:00
Pea M. Tyczynska
9b69d16963 Merge pull request #3554 from alphagov/convert-single-line-textboxes-to-govuk-frontend
Convert single line textboxes to govuk frontend
2020-08-18 11:29:44 +01:00
Pea M. Tyczynska
3bbce24b06 Merge pull request #3558 from alphagov/only-allow-new-template-if-permission-is-there
Services can only create templates of types they have turned on
2020-08-17 14:39:16 +01:00
Pea Tyczynska
36c1ffa7be New template button takes user to new template page
for all services that only allow sending one type of notifications
2020-08-14 17:15:45 +01:00
Pea Tyczynska
bf5ccd044b Services can only create templates of types they have turned on 2020-08-14 17:13:56 +01:00
Pea Tyczynska
67da2c28bf Deep merge jsonlike objects
Also remove duplicate checkboxes code
2020-08-14 14:58:05 +01:00
Chris Hill-Scott
1c74d0798a Add singular descriptions for libraries
This lets us write nice interface copy like ‘Choose a local authority
from the local authorities library’.
2020-08-13 17:54:46 +01:00
Tom Byers
d8355be6fc Add comment explaining use of textbox for tel 2020-08-13 11:40:09 +01:00
Pea Tyczynska
2252e68d37 Remove duplicate spellcheck false for email fields 2020-08-13 10:53:28 +01:00
Chris Hill-Scott
781847d32c Merge pull request #3557 from alphagov/view-only-broadcast-page
Let users without `send_messages` view broadcasts
2020-08-12 15:16:39 +01:00
Tom Byers
bff07c10b1 Convert IntegerFields to GovukIntegerFields
Changes those fields in the following forms:
- FreeSMSAllowance
- ProviderForm
- ProviderRatioForm
- ServiceDataRetentionEditForm

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
97ddc7923a Add GovukIntegerField - extends IntegerField 2020-08-12 10:34:51 +01:00
Tom Byers
c715681f5c Convert DateFields to GovukDateFields
Changes those fields in the following forms:
- DateFilterForm
- RequiredDateFilterForm

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
8faca47152 Add GovukDateField - extends DateField 2020-08-12 10:34:51 +01:00