Commit Graph

2401 Commits

Author SHA1 Message Date
Chris Hill-Scott
69b1ecb57c Add folder-style navigation even if you don’t have folders 2019-05-01 11:17:59 +01:00
Chris Hill-Scott
d9da63401f Normalise heading sizes
Since we added template folders the templates page has had a ‘medium’
sized heading, where other pages have stuck with a ‘large’ size.

This commit rationalises the decision around which pages have which
heading size:
- ‘navigation’ pages (eg templates, team members, email reply to
  addresses) have medium sized headings
- transactional pages (ie ones which have a green button) keep the
  larger heading size
2019-04-30 15:30:31 +01:00
Chris Hill-Scott
74fb30ce5f Add GOV.UK Design System style back links
The Design System has standardised on back links being at the top of the
page, decorated with a small text-coloured arrow.

I think this makes more sense than having them at the bottom, because it
suggests, in some way, being able to go back before commiting to any of
the forms on the page. Whereas the things at the bottom of the page
should be performing actions on what’s in the page.

The reason for making this change now is that it de-clutters the area
around the green buttons. This was presenting a design challenge where
multiple levels of interaction were happening in the same form. Moving
these back links to the top of the page should mean that, in these
complicated forms, there’s one fewer thing to compete for the user’s
attention.

I’ve componentised this into a `page_header` macro so that the change is
easier to roll out and maintain.
2019-04-30 15:29:39 +01:00
Chris Hill-Scott
3cfe4740fb Make ‘Add a new service’ a button
This, along with putting it in a sticky footer, makes it consistent with
the ‘Add template’ and ‘Invite team member’ buttons.
2019-04-30 15:08:40 +01:00
Chris Hill-Scott
9e238a4f87 Merge pull request #2923 from alphagov/dont-ask-org-type
Don’t ask for organisation type when we know it
2019-04-30 11:22:21 +01:00
Chris Hill-Scott
0f2f9fa946 Merge pull request #2931 from alphagov/rationalise-settings
Allow more space for values in settings tables
2019-04-29 16:58:24 +01:00
Chris Hill-Scott
0512f40ad3 Fix misleading class name
Not sure where this came from, but visually our tables have always
aligned text to the left by default.
2019-04-29 16:36:47 +01:00
Katie Smith
d689b031a2 Allow non-gov email addresses to be changed to gov email addresses
When a user's email address is updated, we not allowing it to be changed
to a non-government email address. We now allow a non-gov email address
to be changed to another non-gov email address. Government email
addresses still cannot be changed to non-government email addresses.

Also fixes the link in the error message on the ChangeEmailAddress form -
this was being escaped before.
2019-04-25 10:36:04 +01:00
Chris Hill-Scott
da19c0b4ad Remove bullets from lists in tables
I think this is something we inherited from the Digital Marketplace
code. We only use this for organisation settings are the moment, but
the list markers are redundant because each item will never wrap onto a
new line; it will truncate instead. Still keeps a little sliver of
spacing just so it doesn’t look like a paragraph.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
d3caaf94b1 Make archive/suspend links not buttons
They don’t immediately perform an action, so semantically they are
links, not buttons.
2019-04-24 16:11:32 +01:00
Tom Byers
2eab320fe3 Merge pull request #2912 from alphagov/add-jest-framework
Add Jest framework for testing JavaScript
2019-04-24 14:02:09 +01:00
Chris Hill-Scott
f726551714 Remove unused method
We use `.get_free_sms_fragment_limit_for_year()` instead, which
functionally is the same thing (has a default argument of `year=None`).
2019-04-24 13:10:41 +01:00
Tom Byers
00c1ebf02a Add test for autofocus.js
One of the simplest of our JavaScript files to
test how difficult this is.

Answer is not too bad and includes the file
needing a DOM to operate on and jQuery in the
global scope.
2019-04-24 10:46:55 +01:00
Chris Hill-Scott
9c846979be Don’t error if service without an organisation requests to go live
It was trying to look at `organisation.domains`, which caused an
`AttributeError` if there wasn’t an organisation.
2019-04-23 16:48:15 +01:00
Chris Hill-Scott
9f1bc285fa Merge branch 'master' into record-user-that-requested-to-go-live 2019-04-23 15:38:44 +01:00
Chris Hill-Scott
08e9b35d7a Don’t ask for organisation type when we know it
Every time someone adds a new service we ask them what kind of
organisation they work for.

We can look this up based on the user’s email address now. So we should
only ask the question if:
- we don’t know about the organisation
- or we haven’t set what type of organisation it is (this shouldn’t be
  possible on productions because we’ve populated the column for all
  existing organisations and it’s impossible to add a new one without
  setting it
2019-04-18 14:08:13 +01:00
Chris Hill-Scott
7beea0b2ac Merge pull request #2922 from alphagov/features-footer-second-pass
Features and footer updates
2019-04-18 13:17:16 +01:00
Chris Hill-Scott
aa16e1f2ce Add tests to make sure static pages render
This will catch if we accidentally break them by adding a `url_for` that
references a non-existant endpoint or something like that.
2019-04-18 13:06:39 +01:00
Chris Hill-Scott
9d32d40ee4 Merge pull request #2908 from alphagov/allow-invited-users-to-count
Let inviting a user complete the go live checklist
2019-04-18 11:17:56 +01:00
karlchillmaid
f3a2e695fb Merge pull request #2858 from alphagov/features-content-updates
Update features and footer content and answer some common support questions.
2019-04-16 15:42:51 +01:00
Rebecca Law
da8eead475 Update service with the user that requested to go live.
When a service is marked as live update the service with the go live datetime.
2019-04-16 15:01:54 +01:00
karlchillmaid
0ee322f137 Merge branch 'master' into features-content-updates 2019-04-16 13:50:50 +01:00
karlchillmaid
5f1482f223 Correct time formatting 2019-04-16 11:03:09 +01:00
karlchillmaid
a384ae8f9b Make the formatting of postage times consistent 2019-04-16 10:38:54 +01:00
karlchillmaid
f833a9bd67 Make the formatting of postage times consistent 2019-04-16 10:36:32 +01:00
Chris Hill-Scott
116f36192f Let inviting a user complete the go live checklist
At the moment you have to wait for whoever you’ve invited to accept the
invitation before you can go live. Since this check is mainly for the
benefit of the service, not us, we should trust that people’s intentions
are good when they invite someone.

So this commit also checks the invited users when counting how many team
members a service has.
2019-04-12 22:45:48 +01:00
Chris Hill-Scott
8626777fde Don’t let services go live without an organisation
We shouldn’t be making services live without an agreement in place. In
order to have an agreement in place we need to know what organisation
operates the service.

If a service comes along but belongs to an organisation we don’t know
about then we should create that organisation. This commits removes the
link, which should force this to happen.
2019-04-12 22:42:23 +01:00
Chris Hill-Scott
700e073d0f Stop sending service domain to the API
The API doesn’t look at it, and the rest of the admin code isn’t calling
the method with this argument any more.
2019-04-12 17:15:51 +01:00
Pea (Malgorzata Tyczynska)
5ac6255be7 Merge pull request #2897 from alphagov/overlay-for-failed-letters
Precompiled show preview with overlay when validation fails
2019-04-12 16:37:53 +01:00
Chris Hill-Scott
8084dce705 Merge pull request #2896 from alphagov/remove-domains-yml
Use organisations from database rather than YAML file
2019-04-12 16:37:15 +01:00
Chris Hill-Scott
9d99c78c3a Remove code that reads domains.yml
Since we’ve removed calls to this code from the rest of the app, it can
safely be removed now.
2019-04-12 15:23:08 +01:00
Chris Hill-Scott
470b8a2912 Remove domains from branding forms
We’re deprecating storing the domain as text on a branding in favour of
a database relationship between branding and organisation.

We need to do this now in order to remove the validation on these fields
(which depends on the data in `domains.yml`)
2019-04-12 15:23:07 +01:00
Chris Hill-Scott
9684e962ae Refactor go live tags into service model
Since this function only takes one argument, a service, it might as well
be a method of the service.
2019-04-12 15:19:32 +01:00
Chris Hill-Scott
3565ffc33f Remove dependence on domains.yml from settings
Settings looked at `domains.yml` when users were making go live requests
or email branding requests.

This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 15:19:31 +01:00
Chris Hill-Scott
b41c3779c4 Merge pull request #2906 from alphagov/auto-service-counts
Automate counting of live services and orgs
2019-04-12 14:15:41 +01:00
Chris Hill-Scott
835d11d8d6 Remove domains.yml dependence from agreement pages
This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 14:12:10 +01:00
Chris Hill-Scott
98249158cb Stop trying to infer branding when adding services
The API handles this now.
2019-04-12 14:08:33 +01:00
Chris Hill-Scott
72f49a9a1e Remove dependence on domains.yml from static pages
This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 14:05:00 +01:00
Chris Hill-Scott
9863aa3c48 Automate counting of live services and orgs
Returns the data calculated by the API. Stored in Redis against a
hardcoded key so that no-one hammering the home page is directly hitting
the database.
2019-04-12 13:59:33 +01:00
karlchillmaid
f997b446ff Update app/templates/views/service-settings/request-to-go-live.html
Co-Authored-By: quis <me@quis.cc>
2019-04-11 15:44:28 +01:00
Chris Hill-Scott
436d023722 Block incomplete requests to go live
Dealing with users who request to go live but haven’t completed all the
steps still represents a significant support overhead for our team.
We’ve made some improvements to the percentage of incomplete requests
with a better page design, but ultimately because it still shows the
button people think it’s OK to press the button while some of the items
on the page still say [Not completed].

We can do this now because organisations are in the database, which
means we can mark the agreement signed as soon as we get it back,
without having to deploy code.
2019-04-11 14:35:30 +01:00
Chris Hill-Scott
30504a8026 Fix tests 2019-04-11 12:00:37 +01:00
Katie Smith
88e9a0ff61 Add audit event when a service manager changes someones profile
We should audit when a service manager changes a user profile that is not
their own. This can be recorded in our events table, which is currently
only used to record successful logins.

This adds two new types of event, `update_user_email` and
`update_user_mobile_number` which store the
- browser fingerprint
- IP address
- user id of the user being updated
- user id of the service manager  making the change
- original email address and new email address (for `update_user_email`
events)
- original mobile number and new mobile number (for
`update_user_mobile_number` events)
2019-04-09 14:37:37 +01:00
Leo Hemsted
249b80762a add count of folders visible per user to the team members page
Shows a count of how many folders that user can see - this doesn't do
anything smart with parent folder stuff, it's just "how many checkboxes
are ticked on the edit page".

* doesn't show if service has no folders
* doesn't show if service hasn't got folder permissions enabled
2019-04-04 17:55:37 +01:00
Pea Tyczynska
858e98736f Test that preview with overlay gets called 2019-04-04 13:41:30 +01:00
Leo Hemsted
1984128d1f Merge pull request #2893 from alphagov/copy-service-folder
fix bug with copying template from folder in other service
2019-04-03 14:13:27 +01:00
Leo Hemsted
3e3c11f3a0 fix bug with copying template from folder in other service 2019-04-03 13:59:44 +01:00
Chris Hill-Scott
b1b496ba56 Say what the current email branding is
We keep getting people requesting branding when they already have the
branding they want set. Seems like they don’t realise we’re doing it
automatically. This might help.
2019-04-03 11:54:33 +01:00
Chris Hill-Scott
7436a568dd Merge pull request #2884 from alphagov/team-members-not-users
Say ‘team members’ not ‘users’ for permissions
2019-04-02 15:52:49 +01:00
Pea Tyczynska
bd66cc220b User permissions section for a folder noy visible if service only has one user
If no manage users permission then don't pass user folder permissions to api
2019-04-02 15:03:41 +01:00