Commit Graph

5906 Commits

Author SHA1 Message Date
Tom Byers
32aba71ab7 Add GOVUK Frontend Sass, configured for this app
Like:

https://github.com/alphagov/govuk-frontend/blob/v2.13.0/package/all.scss

...but specifying the components to include,
starting with the ones that make up the
govuk_template and setting any variables needed.
2019-11-22 17:44:16 +00:00
karlchillmaid
0599f54a83 Merge pull request #3191 from alphagov/update-trial-mode-content
Update trial mode content
2019-11-22 14:59:47 +00:00
karlchillmaid
fd5121b8f1 Amend request to go live content 2019-11-22 14:47:59 +00:00
karlchillmaid
23ab557dbb Update request to go live 2019-11-22 14:24:07 +00:00
karlchillmaid
72ab59f34c Update request to go live content 2019-11-22 14:22:32 +00:00
karlchillmaid
6675793241 Update link text 2019-11-22 14:17:15 +00:00
karlchillmaid
93dcb7e0b8 Update API integration information 2019-11-22 10:13:54 +00:00
karlchillmaid
c926a0175e Add request to go live instructions 2019-11-21 15:53:52 +00:00
karlchillmaid
dfea129564 Replace your with the 2019-11-21 09:33:51 +00:00
karlchillmaid
9ab92adf8f Replace 'set up' with 'add'
This matches the language we use in the service
2019-11-20 14:58:50 +00:00
karlchillmaid
02d9d1042b Update request to go live content 2019-11-20 14:22:46 +00:00
karlchillmaid
4e7a5aaaa1 Update app/templates/views/trial-mode.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-11-20 13:45:29 +00:00
Pea (Malgorzata Tyczynska)
d07a370658 Merge pull request #3179 from alphagov/validate-service-and-org-name
Validate service and organisation name
2019-11-20 13:37:10 +00:00
Pea Tyczynska
21e6d994b9 Validate service and organisation name 2019-11-20 13:31:01 +00:00
karlchillmaid
3d6b66b21d Update content 2019-11-20 11:34:03 +00:00
karlchillmaid
b5fb43212a Update lead in and second bullet 2019-11-20 11:32:42 +00:00
karlchillmaid
1a25ac9676 Update trial mode content 2019-11-20 11:25:36 +00:00
Chris Hill-Scott
ebb29b82a9 Merge pull request #3189 from alphagov/update-tags-new-taxonomy
Update Zendesk tags to reflect new taxonomy
2019-11-20 10:59:17 +00:00
Chris Hill-Scott
a3ae9e8ba0 Update product page with new letter prices
We updated the letter pricing in https://github.com/alphagov/notifications-admin/pull/3128

The minimum price has gone up from 30p to 35p
2019-11-20 10:53:39 +00:00
Chris Hill-Scott
12b7c5d5e8 Remove notify_go_live_incomplete tag
The new taxonomy doesn't have a `notify_go_live_incomplete` tag. We
replaced this with `notify_go_live_incomplete_mou` because the only way
users can submit an incomplete request is if they do not agree to the
MOU.

These are the incomplete tags:

- `notify_go_live_incomplete_mou`
- `notify_go_live_incomplete_reply_to`
- `notify_go_live_incomplete_shared_email`
- `notify_go_live_incomplete_templates`

Of those, only the first one is applied automatically.
2019-11-19 16:42:25 +00:00
Chris Hill-Scott
7a5d301104 Update Zendesk tags to reflect new taxonomy
Requests to go live and email branding requests come through to Zendesk
with tags attached automatically.

With the revised taxonomy some of these tags need to be updated, as
summarised in this spreadsheet.

In addition, `notify_action` tag has to be added in each of those cases.

Old|New
---|---
`notify_request_to_go_live_complete`|`notify_go_live_complete`
`notify_request_to_go_live_incomplete`|`notify_go_live_incomplete`
`notify_action_add_branding`|`notify_branding`
`notify_request_to_go_live_incomplete_mou`|`notify_go_live_incomplete_mou`
`notify_request_to_go_live`|`notify_go_live`

– https://docs.google.com/spreadsheets/d/1o5ATsFsVK8Qpj7x8QvxX-SfEuBZ75028GEySVcdBFYU/edit#gid=0https://www.pivotaltracker.com/story/show/169842970
2019-11-19 15:46:29 +00:00
karlchillmaid
94ee7b16d9 Merge pull request #3180 from alphagov/update-error-page-content
Update error page content
2019-11-19 09:39:14 +00:00
karlchillmaid
2ae8cc6e68 Fix quotes 2019-11-18 17:09:34 +00:00
Chris Hill-Scott
0361fb6991 Fix duplicated ‘GOV.UK Notify’ in page titles
The `per_page_title` block appends ‘– GOV.UK Notify’ – there’s no need
to hard code it (see e4b040b380/app/templates/admin_template.html (L15))
2019-11-18 17:08:20 +00:00
karlchillmaid
7065f158d9 Update Classifications and security vetting 2019-11-18 13:48:54 +00:00
Chris Hill-Scott
32cc08432c Merge pull request #3160 from alphagov/no-min-height-sticky-button
Remove min-height from sticky submit buttons
2019-11-15 12:35:21 +00:00
Chris Hill-Scott
3d9d841eae Merge pull request #3183 from alphagov/send-thousands
Comma-delimit thousands in ‘Send’ button
2019-11-13 16:59:09 +00:00
Chris Hill-Scott
37f0c4459b Prefer shorter URL
Flask will pick the first route that matches. Decorators get applied
from innermost to outermost.

So if the same endpoint is served at `/abc` and `/123` the one used
when `url_for` is generating a URL is whichever decorator is lowest
(in terms of line number).

It doesn’t functionally make a difference, but it’s causing the
functional tests to fail at the moment. And shorter URLs are nicer, so
I think it makes sense to change here, rather than change the tests.
2019-11-13 15:13:57 +00:00
Chris Hill-Scott
91283c99b9 Add a specific route for template_type=all
`all` is not a real template type, so for links to template folders that
apply to all template types we have a URL that looks like:
```
/services/<uuid:service_id>/templates
```

However Flask only generates this url when `url_for` is called with
`template_type=None`. If called with `template_type=all` then Flask will
generate a URL like
```
/services/<uuid:service_id>/templates/all
```

However attempting to load this URL will now 404, since `all` is not a
template type recognised by the regex introduced in
https://github.com/alphagov/notifications-admin/pull/3176

It would be nice to not have URLs with `all` in them at all, but since
people might have bookmarked them we need to support them indefinitely.

Also considered but decided against adding `all` to the set of template
types because it might cause other problems, for example attempting to
create a new template with a type of `all` would never work.
2019-11-13 14:17:30 +00:00
Chris Hill-Scott
c3b2017f47 Comma-delimit thousands in ‘Send’ button
Matches the style of how we display numbers in the thousands elsewhere.
2019-11-13 13:29:49 +00:00
Chris Hill-Scott
a0f6f9b137 Add a specific route for template_type=all
`all` is not a real template type, so for links to template folders that
apply to all template types we have a URL that looks like:
```
/services/<uuid:service_id>/templates/folders/<uuid:template_folder_id>
```

However Flask only generates this url when `url_for` is called with
`template_type=None`. If called with `template_type=all` then Flask will
generate a URL like
```
/services/<uuid:service_id>/templates/all/folders/<uuid:template_folder_id>
```

However attempting to load this URL will now 404, since `all` is not a
template type recognised by the regex introduced in
https://github.com/alphagov/notifications-admin/pull/3176

It would be nice to not have URLs with `all` in them at all, but since
people might have bookmarked them we need to support them indefinitely.

Also considered but decided against adding `all` to the set of template
types because it might cause other problems, for example attempting to
create a new template with a type of `all` would never work.
2019-11-13 12:53:53 +00:00
Chris Hill-Scott
24dc438446 Merge pull request #3176 from alphagov/require-uuids-in-urls
Be stricter about the format of URL parameters
2019-11-13 10:33:31 +00:00
Tom Byers
74e280ce51 Fix reference to main.support in views 2019-11-12 17:02:38 +00:00
karlchillmaid
894fc6eacf Update page title 2019-11-11 09:43:35 +00:00
karlchillmaid
0c18f3c55a Update 500 error content 2019-11-11 09:16:39 +00:00
karlchillmaid
0d9f5f5acf Update 413 error content 2019-11-11 09:07:05 +00:00
karlchillmaid
d2c3705d57 Update 410 error content 2019-11-11 09:05:15 +00:00
karlchillmaid
e8c53ac2c5 Update 404 error content 2019-11-11 09:02:57 +00:00
karlchillmaid
ee1c3d6853 Update 403 error content 2019-11-11 08:57:09 +00:00
karlchillmaid
6160be9db4 Update 401 error content 2019-11-11 08:54:27 +00:00
Katie Smith
a542047581 Show recipient when about to send uploaded letter
The recipient of the letter now displays at the bottom of the page when
previewing a valid letter. The template preview `/precompiled/sanitise`
endpoint returns the address, but we format it to display on a single
line with commas between each line. We also need to convert the
recipient address to ASCII so that it can be stored as S3 metadata.
2019-11-08 10:17:11 +00:00
Chris Hill-Scott
bf981c308a Require return_to param in action_blocked
The `action_blocked` endpoint needed a variation of the URL without
a `template_id` parameter, because `None` is no longer a valid
`template_id` (because it’s not a UUID).

This change was made in 265931d21746918c4ddfc19c4ad3f8cb5683c1bf, which
also removed the `return_to` parameter, because the back link on the
`action blocked` page only ever goes to `add_new_template` if there’s
no `template_id` provided.

However this was conflating the two things, so I’ve wound it back a bit
so that:
- there’s still a new route, whose URL doesn’t include `template_id`
  as a parameter
- `return_to` is always required

I’ve also refactored the code a bit to move the looking up of the back
link from the Jinja into the view layer, so that the related code is in
one place and easier to reason about.
2019-11-07 17:55:35 +00:00
Chris Hill-Scott
545b485d86 Add URL converters for template and file types
Sometimes we manually check that a URL parameter is in a required set.
Sometimes we don’t bother.

This commit adds a URL converter to do this so that:
- we don’t have to re-write the same code every time
- it’s easier to apply this check to other endpoints

This means endpoints that previously allowed a `template_type` or
`message_type` of `None` now 404. So I’ve had to add new routes for
with URLs that don’t include such parameters.

So this…:
```
/services/128b91b6-2996-4107-bb65-51b7c24a728d/notifications/sms.csv
/services/128b91b6-2996-4107-bb65-51b7c24a728d/notifications/None.csv
```

…becomes:
```
/services/128b91b6-2996-4107-bb65-51b7c24a728d/notifications/sms.csv
/services/128b91b6-2996-4107-bb65-51b7c24a728d/notifications.csv
```

This matches what we do for the HTML-responding equivalent (see
265931d217/app/main/views/jobs.py (L215-L216))
2019-11-07 13:48:09 +00:00
Chris Hill-Scott
ef335e7601 Require IDs to be UUIDs in URLS
We mostly rely on the API returning a 404 to generate 404s for trying
to get things with non-UUID IDs. This is fine, except our tests often
mock these API calls. So it could look like everything is working fine,
except the thing your passing in might never be a valid UUID, and thus
would 404 in a non-test environment.

So this commit:
1. uses the `uuid` URL converter everywhere there’s something that looks
   like an ID in a URL parameter
2.  adds a test which automates checking for 1.
2019-11-07 13:46:25 +00:00
Chris Hill-Scott
554a852e2d Don’t return UUID objects from the UUID convertor
Because it means you often have to cast to string in your application
code just to get your tests passing.

The method being monkey patched is originally defined here: b81aa0f18c/src/werkzeug/routing.py (L1272)
2019-11-07 13:46:24 +00:00
Pea (Malgorzata Tyczynska)
21a59598b2 Merge pull request #3170 from alphagov/show-users-why-their-precompiled-letter-failed-validation
Show users why their precompiled letter failed validation
2019-11-07 11:23:30 +00:00
Chris Hill-Scott
653926f636 Merge pull request #3149 from alphagov/resize-all-textbox-dem
Let textareas resize automatically without having to highlight placeholders
2019-11-07 11:13:06 +00:00
Pea Tyczynska
678e0bed81 Show users more detailed validation failed mesage on notification page
Show valdiation failed messages on letter notifications in red text,
not in the banner like we do on Uploads and Validation checker pages.
This is because it is a different step in the journey: the user
has already sent the notification and styling needs to be in line
with other places where user is checking the notification she already
has sent.
2019-11-07 11:10:27 +00:00
Chris Hill-Scott
b671ad239d Merge pull request #3166 from alphagov/usage-back-on-dashboard
Put usage summary back on the dashboard
2019-11-07 10:32:51 +00:00
Pea Tyczynska
f12dc823cb Show dynamic message when letter fails validation in validation checker - part 2 2019-11-06 14:26:16 +00:00