Commit Graph

644 Commits

Author SHA1 Message Date
Chris Hill-Scott
cfadead292 Make it clearer what you’re downloading
The previous text didn’t make it clear _what_ you were downloading as a
CSV file, you had to infer it from the context.

And the fact that it’s a CSV file is immaterial, it’s the data you care
about, not the format.
2016-07-19 12:46:20 +01:00
Chris Hill-Scott
500a503f07 Rewrite job page test to use Beautiful Soup
Beautiful Soup makes it easier to do assertions on specific pieces of
text. The diffs are more useful than when you do `if 'text' in page`.
2016-07-18 09:07:02 +01:00
Chris Hill-Scott
1c8c86bd1c Merge pull request #781 from alphagov/template-previews
Adds previews of email templates
2016-07-15 10:35:15 +01:00
Adam Shimali
22601ab4f6 Increase daily message limit for unrestricted services.
This pr is for:

https://www.pivotaltracker.com/story/show/126230157
2016-07-14 11:38:54 +01:00
Chris Hill-Scott
d380eaf060 Allow images to be served from live domain
Currently images in our email template are hardcoded to be served from
the live domain[1].

In order for the admin app, running locally or in preview/staging, to be
able to load these images when previewing an email template, the CSP
headers need to allow this domain.

Also splits the header string up using string literal concatenation[2]
so that it’s easier to read.

1. https://notifications.service.gov.uk
2. https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
2016-07-12 16:46:46 +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
Rebecca Law
43938936f3 If a user has already registered with the email they will get a different email when the register again.
The email includes likes to sign in and send feedback
2016-07-12 11:53:30 +01:00
Chris Hill-Scott
50c20ce680 Add formatted notification status to CSV
This commit makes the CSV download use the same language for failure
reasons as the frontend.

It also adds a test around this stuff, which was patchily tested before.
2016-07-11 13:12:46 +01:00
Chris Hill-Scott
d33c254fa5 Merge pull request #743 from alphagov/hide-delivery-download-tour
Hide download CSV link when in the tour
2016-07-08 16:31:16 +01:00
Chris Hill-Scott
ec01eee7b9 Merge pull request #766 from alphagov/visual-refactor-team-page
Visual refactor team page
2016-07-08 09:02:20 +01:00
Chris Hill-Scott
f9ebb337e3 Tidy layout of team page
The team page was a bit of a mess:

- invited and active tables didn’t line up
- lots of things were wrapping onto two lines
- the empty fields for when a user didn’t have permissions looked broken

This commit splits each row of the table (not actually a table any more)
onto two lines. First line has the user’s info, second has their
permissions and any associated actions.
2016-07-07 12:43:35 +01:00
Chris Hill-Scott
60f79afb6b Make the date take up less space 2016-07-07 09:18:49 +01:00
Chris Hill-Scott
7fcd56dc02 Add radio buttons for choosing the API key type
Best-guess wording for what the labels and question should be.

Adds a macro for rendering radio buttons from a WTForms field.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
d71269ca87 Hide download CSV link when in the tour
There is really no point to downloading the CSV file of delivery
info when you’re in the tour. It’s just distracting at this point.
2016-07-05 17:29:10 +01:00
Chris Hill-Scott
dfbd6610cb Merge pull request #741 from alphagov/revert-template-actions
Revert questionable design decisions in send messages flow
2016-07-05 16:58:20 +01:00
Chris Hill-Scott
47a1bbce8e Merge pull request #751 from alphagov/fix-get-started
Fix get started banner on dashboard
2016-07-04 15:33:51 +01:00
Adam Shimali
5c62a14b2d Parameterize test 2016-07-04 14:53:34 +01:00
Adam Shimali
4edd308a54 Better flash messages for setting text message sender. 2016-07-04 13:46:50 +01:00
Chris Hill-Scott
cddfd6c517 Fix get started banner on dashboard
This banner was always being shown because the template was never
getting sent the service’s templates from the API.

This commit fixes this to only show the banner when a service has no
templates, and adds some tests to make sure it doesn’t happen again.
2016-07-04 13:15:32 +01:00
Adam Shimali
1efd8506db Can remove sms sender. 2016-07-01 16:32:21 +01:00
Chris Hill-Scott
3241710a96 Rename check and confirm to preview
We’ve seen people land on this page and expect the message to be on
their phone already.

‘Check and confirm’ sounds a lot like ‘check your phone’, which is
language that we use earlier on when we _have_ sent a message.

Hopefully ‘preview’ is a better indication that it’s not sent yet.
2016-07-01 14:27:58 +01:00
Adam Shimali
3bfcf0f8b3 Users can set a value that appears as the sender of a text message.
It can be up to eleven characters alpha numeric, no special characters
allowed.
2016-07-01 14:22:25 +01:00
Chris Hill-Scott
facfb98bb3 Merge pull request #744 from alphagov/tour-to-dashboard
Go to the dashboard after finishing the tour
2016-07-01 14:18:08 +01:00
Chris Hill-Scott
721212816d Redirect to the dashboard after the tour
After the tour we should ground users by dropping them on the dashboard.

In the background, we delete the example text message template. This
means that users start from a clean slate when they go to add their own
templates

This also means some wording changes to the tour so it still makes
(some) sense:

- 1, 2 and 3 should refer to the current step, not describe the next
  one
- the link should take you to the dashboard
- change from ‘Get started’ to ‘Try this example’ because we’re using
  ‘Get started on the dashboard’
2016-07-01 13:47:51 +01:00
Chris Hill-Scott
02dccde0bd Don’t show send/edit links for deleted template
Since you can’t really send or edit a deleted template we should show
a message telling you that the template has been deleted.

This is important because deleted templates still show up in the
template statistics.
2016-07-01 13:35:48 +01:00
Chris Hill-Scott
a5a35f1a6b Don’t create an example email template
We reckon that:

- a ‘blank slate’ templates page is a better start
- the example template hurt more than it helped when it comes to
  understanding placeholders
2016-07-01 13:26:57 +01:00
Chris Hill-Scott
d9c284418b Merge pull request #731 from alphagov/fix-password-changed-at
Use password_changed_at field from User object
2016-06-28 13:19:20 +01:00
Chris Hill-Scott
bea92df2ed Merge pull request #726 from alphagov/research-mode-platform-admin
Platform admin: Highlight service in research mode
2016-06-28 13:19:05 +01:00
Rebecca Law
584ad26a1a Merge branch 'master' into fix-password-changed-at
Conflicts:
	tests/conftest.py
2016-06-28 11:02:53 +01:00
Rebecca Law
de42391afa Keep Last changed text.
Update user test data to include the password_changed_at attribute.
2016-06-28 10:40:39 +01:00
Rebecca Law
7d64b77e5d Use password_changed_at field from User object rather than use a hard coded date.
https://www.pivotaltracker.com/story/show/122205615
2016-06-27 17:03:15 +01:00
Leo Hemsted
6ce087a7b5 send key_type = normal when creating api keys 2016-06-27 12:02:16 +01:00
Chris Hill-Scott
f0ae43db2c Remove gnarly indentation
By combining the two `with` statements.

No functional changes, split into a separate commit for easier
reviewing.
2016-06-24 10:26:45 +01:00
Chris Hill-Scott
4809a26ffe Remove redundant test
This test is no replicated in the one below, so is no longer needed.
2016-06-24 10:26:45 +01:00
Chris Hill-Scott
ceef77b2af Fix ‘help’ appearing when it shouldn’t
Steps to reproduce:
- make a template with a placeholder
- click ‘send yourself a test’
- leave fields blank
- click ‘check’
- see error, click ‘back’

Expected: previous page

Actual: previous page with blue help sidebar

When the URL contains `help=0`, `request.args.get('help')` returns '0'.
Doing `if '0':` is the same as doing any `if <non empty string>:` which
returns `True`.

So we should only display the help when the help query parameter is:

- not missing
- AND a string that isn’t `'0'`
2016-06-24 10:26:45 +01:00
Chris Hill-Scott
e988a3633a Platform admin: Highlight service in research mode
Research mode trumps live.

Copies the same style we use in the page footer.
2016-06-23 17:47:19 +01:00
Chris Hill-Scott
68cb76a12e Merge pull request #715 from alphagov/fancy-homepage
Make it clearer what Notify is for from homepage
2016-06-22 15:01:17 +01:00
Chris Hill-Scott
18963f4645 Redirect to homepage after signout 2016-06-22 14:37:02 +01:00
Leo Hemsted
cabf6cb6b1 Merge pull request #717 from alphagov/service-status
Add live/trial flag on platform-admin page
2016-06-22 14:28:44 +01:00
Chris Hill-Scott
0c31931876 Fix background colours on big numbers without links 2016-06-22 13:40:55 +01:00
Leo Hemsted
c5f8e1a259 Add live/trial flag on platform-admin page
Show 'Live' or 'Trial' under each service to easily identify services
2016-06-21 12:27:49 +01:00
Adam Shimali
d4103767d2 Merge pull request #712 from alphagov/notification-stats-day-admin
Daily limit bugfix
2016-06-21 11:09:11 +01:00
Adam Shimali
f030d1cb8a Move check_messages in admin over to using get notification stats for
day.
2016-06-20 13:49:47 +01:00
Chris Hill-Scott
e44d9895ce Tidy up ‘change service name’ page
- Make service name repopulate in textbox
- More spacing between sections of the page
2016-06-20 13:33:29 +01:00
Chris Hill-Scott
b7e58b0a5b Unroll unneccessary for loop 2016-06-20 10:07:37 +01:00
Chris Hill-Scott
7416070199 Refactor job conftests to eliminate temp variables
These tests were assigning something to a variable, then immediately
returning that variable. Why not just return the thing itself?
2016-06-20 09:31:29 +01:00
Chris Hill-Scott
8ca7832541 Filter test messages from jobs on the dashboard
While test messages technically have a file and are a job, there’s not
much reason to ever revisit them. So all they end up doing is cluttering
the dashboard and making it harder to find the actual files you’ve
actually uploaded from your computer.

So this commit:

- abstracts the name of test messages into config
- filters out any files whose filename represents a test message
- adds some more thorough tests for the jobs on the dashboard
2016-06-20 09:31:20 +01:00
Chris Hill-Scott
87a8906f1a Merge pull request #701 from alphagov/label-template-statistics
Add some words to the template statistics on the dashboard
2016-06-20 09:27:28 +01:00
Chris Hill-Scott
fa7345e9d0 Make template statistics on the dashboard a table
It was a `<dl>` before which is kinda weird. Especially when the jobs
table was a real `<table>`.

It also means we can give it column headings so that new and invited
users have a better idea of what it is.
2016-06-17 16:30:02 +01:00
Leo Hemsted
539950d772 when not logged in, redirect to sign-in
parts of the initial setup/login stages were throwing 500s if user
not already in process (ie: user directly navigated to url):
* /resend-email-verification
* /text-not-received
* /send-new-code
* verify
2016-06-17 13:53:48 +01:00