Commit Graph

8533 Commits

Author SHA1 Message Date
Ben Thorner
59f6b0b5d8 Replace "primary", etc. with "first", etc.
Using "primary" made sense when the other "secondary" provider was
new, but today we see them as equivalent and the terminology is a
bit confusing. In future we may add a third provider as well.
2022-04-05 15:55:06 +01:00
Ben Thorner
55e2a2f96b Stop reversing the order of SMS providers
This makes no functional difference but does make it easier to read.
2022-04-05 15:55:05 +01:00
Ben Thorner
9355c4f8d1 Only show active providers when changing priority
This fixes a bug where a third inactive provider would (potentially)
appear in place of one of the two active ones, depending on the order
of its identifier compared to the other two.

In future we may look at simplifying this to cope with more than two
active providers. For now, the existing UI will continue to work when
we add a new, inactive SMS provider for Reach.
2022-04-05 15:55:04 +01:00
Ben Thorner
7a7d8f8aa6 Link to history for SMS providers
Although the priority history is shown on the "Change priority"
page, this doesn't show active/inactive changes.
2022-04-05 15:54:58 +01:00
David McDonald
9a2f6f27df Merge pull request #4195 from alphagov/pricing-page-update-1-april-22
Update text message allowances and cost
2022-04-01 10:02:50 +01:00
karlchillmaid
7c208c48b4 Update text message allowance and cost 2022-04-01 09:14:24 +01:00
karlchillmaid
7ec5c7262a Update text message cost 2022-04-01 09:11:56 +01:00
Ben Thorner
6030e9e5bb Decouple the set of org types from their labels
In response to: [^1].

[^1]: https://github.com/alphagov/notifications-admin/pull/4196#discussion_r838383086
2022-03-30 17:46:53 +01:00
Ben Thorner
332c240b01 Use "get_email_choices" directly in branding view 2022-03-30 17:46:44 +01:00
Ben Thorner
b4b1c91fb9 Remove redundant "something else" branding check
This is always allowed and there was no test for it.
2022-03-30 17:46:43 +01:00
Ben Thorner
8a7eed9b26 Minor refactorings to help read branding rules
I did consider having a "has_govuk_branding" variable, but I think
it's better to reinforce what this means with comments.
2022-03-30 17:46:42 +01:00
Ben Thorner
1cc5413f96 Move and clarify "NHS_BRANDING_ID" constant
This is specific to email branding [^1]. Using the name to match
the current branding is more error-prone.

[^1]: a165f62b60
2022-03-30 17:46:41 +01:00
Ben Thorner
21eea0189d DRY-up listing NHS organisation types
The model should be the source of truth for this.
2022-03-30 17:46:40 +01:00
Ben Thorner
8f55972aae Split "get_available_choices" by branding type
We already had different functionality for email branding and will
soon be adding more for email branding pools.

Note that the "get_available_choices" class method was only used for
email branding - we can do it in the constructor for letters.
2022-03-30 17:46:39 +01:00
Ben Thorner
f022836f4d Move letter-specific logic down to its form class
For letters we still have the conditional reveal on the radio form
for the "something else" option.
2022-03-30 17:46:38 +01:00
Ben Thorner
352cdb80fa Remove remaining uses of ChooseBrandingForm
This was missed in a previous commit.
2022-03-30 17:46:37 +01:00
Pea Tyczynska
7d5ca324d0 Merge pull request #4166 from alphagov/allow_user_delete_mobile_number
Let users on email auth delete their mobile numbers
2022-03-25 16:02:38 +00:00
Pea Tyczynska
190381c578 Make sure delete mobile number only shown when needed
Users who have no mobile number set, users who are not on email auth
and users who are not on "Change mobile number" page should not
see the delete link.
2022-03-25 15:49:03 +00:00
Ben Thorner
3a6ceac910 Merge pull request #4198 from alphagov/service-history-link
Show link to service history in the settings page
2022-03-25 09:49:00 +00:00
Ben Thorner
3164134260 Merge pull request #4197 from alphagov/show-api-keys-broadcast-179120842
Make it easy to see API keys for broadcast service
2022-03-25 09:48:51 +00:00
Ben Thorner
422b4c1091 Show link to service history in the settings page
Based on discussion in [^1].

[^1]: https://github.com/alphagov/notifications-admin/pull/4157
2022-03-24 12:58:56 +00:00
Ben Thorner
808f248782 Rename "page-footer-delete-link" class
This doesn't set any deletion-specific attributes so it's valid to
just call it "page-footer-link".
2022-03-24 12:58:08 +00:00
Ben Thorner
b6bc598e8c Make it easy to see API keys for broadcast service
This made it easier to debug a problem with the functional tests
due to the fixtures not working correctly [^1]. It's a platform
admin only convenience over knowing the page URL.

We may want to expose the top-level "/api-integration" page but
that will require more work to show which broadcasts were sent with
which key - currently it's oriented around "messages". For now I
think it's useful to see what keys a service has.

[^1]: https://github.com/alphagov/notifications-functional-tests/pull/411#pullrequestreview-920069799
2022-03-24 12:33:09 +00:00
Tom Byers
23ca2dcabc Merge pull request #4193 from alphagov/fix-nav-link-focus-hover-bug
Strip underline from focused + hovered nav links
2022-03-24 11:27:48 +00:00
Pea Tyczynska
99682db7bf Change conditional for consistency 2022-03-22 17:55:55 +00:00
Ben Thorner
d1d3a6a6c3 Merge pull request #4182 from alphagov/refactor-email-branding-181415991
First set of refactorings for branding
2022-03-22 13:43:10 +00:00
karlchillmaid
2031d41df7 Update prices and date 2022-03-22 12:22:54 +00:00
Pea Tyczynska
eb0851e1e3 Please the navigation thing 2022-03-18 13:08:09 +00:00
Tom Byers
848ee72e3f Strip underline from focused + hovered nav links
Our CSS for links in the navigation, which makes
the underline appear on hover is overriding the
GOVUK focus styles, making it look like there are
2 underlines. This adds some extra CSS to reset
it.

The new CSS is further down the stylesheet to the
hover styles. This gives them a higher specificity
meaning they override them when these links are
hovered over while in focus.
2022-03-17 16:11:56 +00:00
Chris Hill-Scott
0fa3e009c9 Remove Sizewell from the demo areas library
We added this for the 25 May demo. We’re unlikely to need it again.

We’re also unlikely to need this library again, so this commit removes
the source and the code that creates it.
2022-03-15 14:40:42 +00:00
Ben Thorner
6a2367bb72 Merge pull request #4184 from alphagov/simplify-session-clear
Simplify "activate_user" to clear session earlier
2022-03-15 13:07:53 +00:00
Ben Thorner
f02c2b0b1d Rename other "Admin" forms consistently
I've also tweaked some of the names to make them clearer e.g. that
the form is used to apply a change to a service.

I've constrained the scope of this change to avoid forms that may
be accessible by non-admins in the future.
2022-03-15 11:47:22 +00:00
Ben Thorner
fa3e6435a6 Fix small issues identified in PR review
In response to: [^1], [^2], [^3], [^4], [^5] and [^6].

[^1]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r825824485
[^2]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r825824805
[^3]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r825857745
[^4]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r825859850
[^5]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r825859982
[^6]: https://github.com/alphagov/notifications-admin/pull/4182#discussion_r826001823
2022-03-15 11:47:21 +00:00
Ben Thorner
2fc0a105f4 Move branding choices logic into utility module
This was a lot of code to be in a form and it's going to get even
more complicated with email branding pools. Moving it out means we
can also simplify the tests that target this code.
2022-03-15 11:47:16 +00:00
Ben Thorner
a04ed3eca5 Use separate classes for branding option forms
These are about to become a lot less similar to each other when we
add email branding pools. Note that the optional *args and *kwargs
weren't used anywhere.
2022-03-15 11:47:15 +00:00
Ben Thorner
26d1222f1c Rename branding forms to clarify who they're for
I've often struggled to find the form associated with a particular
page due to the overlapping names e.g. "SetEmailBranding" sounds
more like the radio button form a user sees than "BrandingOptions".

Almost every form in forms.py also ends with "Form", so this also
makes the branding forms consistent with that naming convention.
2022-03-15 11:47:14 +00:00
Chris Hill-Scott
ff46f9beb8 Remove default from format_auth_type
I think it’s better to raise an exception and force us to fix it if we ever add a new auth_type, or use this formatter on something that isn’t a valid auth_type.

Co-authored-by: Ben Thorner <benthorner@users.noreply.github.com>
2022-03-15 10:40:10 +00:00
Chris Hill-Scott
9a1a328aca Format auth_type in a consistent way in the UI
On the ‘find user’ page it says ‘sms_auth’ instead of ‘Text message
code’.

This commit fixes that, and adds a handy formatter so it’s easier to do
the right thing in the future.
2022-03-14 14:55:31 +00:00
Ben Thorner
34c2c3b47c Merge pull request #4176 from alphagov/replay-falsey-values
Replay falsey values in input fields
2022-03-14 09:53:02 +00:00
Tom Byers
e28d7cbb05 Fix comments, remove flex-grow and unused margin
Based on comments on the associated pull request,
(and my realisation that I was using flexbox
wrong):

https://github.com/alphagov/notifications-admin/pull/4171

Removal of flex-grow

I added `flex-grow: 1` to make the description and
status flex items grow to fill the container, at
least until they hit their `max-width`. They
already have `width: 100%` which achieves the same
thing so this removes it.
2022-03-11 14:54:24 +00:00
Tom Byers
9d32316a67 Fix spacing for alert description and status
Using `width` doesn't work for flex-items with
flex-grow set above 0 because they will expand to
fill the space, whatever its value.

The intention for this line was always to
constrain how much these ones can grow to half the
space minus the gap between. `max-width`, which is
still honored by flex-items with `flex-grow` above
0, meaning they will expand up to that size.
2022-03-11 14:54:23 +00:00
Tom Byers
cbcac14e7c Remove grid from alerts file-list
Having a grid in the click target stops the hint
and status text being clickable. This removes it
in favour using flexbox to position the elements
in a similar way.

Includes fallback styles for browsers that don't
support flexbox that positions the child elements
inline, laid out justified, to mimic the flexbox
positioning of justify-content: space-between.

Note: display is overriden on child items under
flexbox so setting display: inline-block is
ignored.
2022-03-11 14:53:55 +00:00
karlchillmaid
a555ac8d07 Merge pull request #4187 from alphagov/sms-price-updates-announcement
Announce text message prices changes
2022-03-10 15:41:38 +00:00
Chris Hill-Scott
0847a26af7 Merge pull request #4175 from alphagov/branding-preview-macro
Prevent scrolling of branding previews
2022-03-10 14:03:37 +00:00
karlchillmaid
1fb2c9cdac remove (unchanged) 2022-03-10 13:59:04 +00:00
karlchillmaid
2d4d7f6b87 Update date 2022-03-10 12:28:21 +00:00
karlchillmaid
2cd09bd04b Add confirmed allowance changes 2022-03-10 11:17:05 +00:00
karlchillmaid
22c15a9a79 Announce upcoming prices changes 2022-03-10 09:57:35 +00:00
Rebecca Law
de46fb6477 Merge pull request #4183 from alphagov/volume_reports
Report for total notifications sent per day for each channel.
2022-03-09 15:15:03 +00:00
Rebecca Law
c6e67d1690 Fix column names
Add unit test
2022-03-09 15:02:52 +00:00