Commit Graph

120 Commits

Author SHA1 Message Date
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
Chris Hill-Scott
c7f34cc211 Fix email branding preview for no branding
The value that means no branding (in the form) has changed from `'None'`
to `'__NONE__'`.

This commit:
- accounts for that value
- makes sure that no branding (ie plain GOV.UK) is still displayed when
  no query argument is given
2018-12-05 11:28:10 +00:00
Chris Hill-Scott
bc6b9c7af7 Use named arguments for clearer string formatting
Helps when the string is long.

Also helps disambiguate between the CDN domain used for the logos and
those for CSS/JS.
2018-11-29 11:56:01 +00:00
Chris Hill-Scott
156d38499a Remove integration testing content
This is covered in the new client library documentation. All of the
client libraries now have their documentation published in the new
format.
2018-11-06 17:24:30 +00:00
Tom Byers
e92230a0ef Allow coloured branding without logo in preview
Coloured brandings can just be a coloured
background with text. At the moment the /_email
preview page assumes a logo image will be part of
a brand so looks broken.
2018-10-11 10:50:42 +01:00
Tom Byers
3655e63d34 Merge pull request #2262 from alphagov/remove_branding_type_from_set_email_branding_page
Remove branding type from set email branding page
2018-08-31 13:56:44 +01:00
Tom Byers
ad0ffcc3f3 Fix issue that happens with branding_style of None
Setting the branding_style to 'None' causes the
API to remove the email_branding field from a
service model. The branding request page
controller was depending on that value being
to present get the brand type.

The email preview page (used in an iframe on
various pages) wasn't able to recognise a
branding_style of 'None', causing a blank page to
render.
2018-08-30 11:38:47 +01:00
Tom Byers
151488fa78 Update email preview page
No longer requires the branding_type GET param.

Retains the 'govuk' default brand.
2018-08-29 16:16:15 +01:00
Chris Hill-Scott
09876532ae Serve robots.txt from the admin app
We’re getting rid of the PaaS proxy, which is where this file is
currently served from.

Values copied from 3632313fdf/ansible/roles/nginx/files/robots.txt
2018-08-29 15:54:17 +01:00
Rebecca Law
f7f202b670 Fix the EmailBranding 2018-08-23 17:44:34 +01:00
Rebecca Law
473c8378fc Created a method to decide which colour to pass into the notifications-utils method to preview the template.
Removed the ServiceCreateEmailBranding form - it is identical to the other form.
2018-08-22 12:56:08 +01:00
Tom Byers
6b0d79ad72 Stop email preview showing brand name
This is a leftover from when email brands didn't
have a 'text' field.

It also adds some tests to check the brand name
is displaying correctly.
2018-08-15 13:52:17 +01:00
Tom Byers
c7610f359a improve range of params email page can take
Can now deal with no query params and has a
default format of the GOV.UK branding.
2018-08-07 16:56:37 +01:00
Pete Herlihy
53a1b05aaf Adding the privacy page to the routes 2018-05-23 14:35:26 +01:00
Leo Hemsted
90c40075c8 Merge pull request #1954 from alphagov/choose-accounts
Choose accounts
2018-03-19 15:26:06 +00:00
Chris Hill-Scott
c2bc7eca2c Make pricing page consistent in talking about MoU
We shouldn’t tell people on one page (the terms page) that we know about
their organisations agreement and then on the pricing page tell them to
contact us to find out what we know about the agreement.

So this commit adds the same logic from the terms page to the pricing
page, with wording that makes sense in the pricing context.
2018-03-16 13:10:40 +00:00
Chris Hill-Scott
056c4ebb88 Rename GovernmentDomain to AgreementInfo
This better describes the data encapsulated by this class, and how we
are now using it.
2018-03-15 10:45:34 +00:00
Chris Hill-Scott
6c47375d9f Make terms page smarter about the agreement
People are emailing us asking if their organisation has signed the
agreement. In some cases they have, so this is a waste of their and
our time.

This commit adds a bit of logic to the terms of use page to tell users
when their organisation has already signed the agreement.
2018-03-14 16:00:59 +00:00
Leo Hemsted
2f37e37278 rename choose_service to choose_account 2018-03-14 15:39:55 +00:00
Leo Hemsted
ffd062c415 fix imports 2018-03-14 15:39:55 +00:00
Leo Hemsted
ad6e34eb43 dont use has_permissions to check for platform admins
platform_admin is a separate concept to permissions, so by removing the
checks for it from the current_user.has_permissions function, we can
simplify things greatly. We already record on the user whether they're
a platform admin anyway.
2018-03-14 15:39:55 +00:00
Athanasios Voutsadakis
d49d97745c Don't serve 500s on demand 2018-03-09 12:28:55 +00:00
Athanasios Voutsadakis
7828afe0d7 Sort requirements 2018-03-09 11:56:34 +00:00
Athanasios Voutsadakis
249ae41c24 Add error handling
This adds an /error/XXX endpoint that triggers the corresponding XXX
error code and its handling.

Related: https://github.com/alphagov/notifications-aws/pull/331
2018-03-08 17:49:08 +00:00
Chris Hill-Scott
f3a0c505bd Enforce order and style of imports
Done using isort[1], with the following command:
```
isort -rc ./app ./tests
```

Adds linting to the `run_tests.sh` script to stop badly-sorted imports
getting re-introduced.

Chosen style is ‘Vertical Hanging Indent’ with trailing commas, because
I think it gives the cleanest diffs, eg:
```
from third_party import (
    lib1,
    lib2,
    lib3,
    lib4,
)
```

1. https://pypi.python.org/pypi/isort
2018-02-27 16:35:13 +00:00
chrisw
2c884a0246 Refactored redirects into seperate method 2017-11-29 13:59:01 +00:00
chrisw
ed33e03d82 Adjusted and added static page views logic 2017-11-28 11:56:30 +00:00
Pete Herlihy
2c74027e0d Adding a route for 'callbacks' page
Gone with callbacks as this page may be extended for delivery receipts in the future.
2017-11-03 11:56:15 +00:00
Chris Hill-Scott
5a15871b88 Dashes not underscores 2017-10-05 15:00:18 +01:00
Pete Herlihy
18bacab039 Added route to information_risk_management page 2017-10-05 14:24:12 +01:00
Pete Herlihy
f7ff745872 New Using Notify static page
Adds the new Using Notify view

Adds route to Using Notify page.

Add redirects for old pages

Removes the delivery and failure page as it's now in the Using Notify one

Removes the trial mode page due to Using Notify page
2017-08-31 11:10:02 +01:00
Chris Hill-Scott
10f81d5d16 Make pricing table searchable
uses the same pattern as searching templates by name.
2017-07-28 15:16:17 +01:00
Chris Hill-Scott
10b87e433b Add international pricing table 2017-07-28 15:16:07 +01:00
Chris Hill-Scott
6d9434d968 Re-order page ready for new stuff 2017-07-28 15:15:02 +01:00
Chris Hill-Scott
86b4a27ca3 Fix the problems 2017-06-14 16:53:16 +01:00
Pete Herlihy
11215a0c16 Adding route for new features page 2017-06-14 16:05:20 +01:00
Ken Tsang
050c90fb64 Updated pricing page 2017-05-04 10:36:21 +01:00
Pete Herlihy
4a59cae96c Added a route to the new Roadmap page 2017-03-24 13:52:25 +00:00
Rebecca Law
dc9524f01e WIP: First attempt at adding a testing doc to the links in the footer.
This may result in changing the developer document section completely.
2017-01-27 17:32:20 +00:00
Chris Hill-Scott
dc63de0f4e Incorporate breaking utils changes
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/94
2016-12-14 14:32:07 +00:00
Henry Hadlow
e4c2fba33d Add Design patterns and content guidance 2016-10-19 13:05:43 +01:00
Henry Hadlow
db30e7aea1 Add Information security guidelines 2016-10-19 13:05:16 +01:00
Henry Hadlow
f5dd38769d Rearrange routes to same order as in footer nav 2016-10-19 13:03:42 +01:00
Rebecca Law
a0e7d569e9 Send an email to the user when they change email address
This PR changes the flow to change an email address.
Once the user enter their password, they are told "Check your email".
An email has been sent to them containing a link to notify which contains an encrypted token.
The encrypted token contains the user id and new email address. Once the link is clicked the user's email address is updated to the new email address.
They are redirected to the /user-profile page.

Also in this commit is an update from flask.ext.login to flask_login.
2016-10-13 17:05:37 +01:00
Chris Hill-Scott
1fccc524a1 Remove documentation pages
These are out of date now and potentially misleading.

Adds a new error page for HTTP `410 GONE`. Looks like the 404 page, but
returns the appropriate error code to be a good web citizen.
2016-10-10 15:58:11 +01:00
Chris Hill-Scott
610eaab1f8 Add more markdown to the example email
We have a route at /_email for testing the email template.

This commit adds:
- ordered lists
- a URL

And it fixes:
- the unordered list (markdown requires two line break before starting
  a list)

This is so that we can test how these features look locally without
having to send an email.
2016-09-19 09:39:37 +01:00
Chris Hill-Scott
743377f6b7 Fix 500 on trial mode page
I was using the trial mode page to prototype the time picker as part of
225a61ddd3.

I didn’t clean up properly, and left an errant undefined variable, which
caused the trial mode page to `500`.

This commit:
- removes the errant argument
- adds a test for all the static pages to make sure that they at least
  return a `200`
2016-09-07 10:49:57 +01:00
Chris Hill-Scott
225a61ddd3 Add a component for picking the time to send a job
Users need to pick a time in the next 24hrs, or send a file immediately.

Rationale for this is a bit lost in time-before-holiday, but generally:

‘Now’ and ‘later’ as the inital choices makes it really clear what
this feature is about conceptually.

The choice of times is absolute, eg ‘1pm’ not ‘in 3 hours’
2016-08-31 16:58:09 +01:00
Chris Hill-Scott
9f91694c71 Add a ‘private’ preview email template endpoint
This will make working on the email template easier.

Includes examples of features like lists, headings, blockquotes, etc.
2016-07-12 16:46:46 +01:00
Henry Hadlow
bd22aa7189 Add Delivery and failure Help page 2016-05-23 09:35:05 +01:00