Commit Graph

11146 Commits

Author SHA1 Message Date
David McDonald
752b685b26 Show only relevant platform admin settings for broadcast service
A few of note

Count in list of live services - this should be set to no in the API (to
be implemented) so we never show broadcast services in the list of live
services to reduce security leaks

Organisation - all broadcast services are currently going to be found in
a single organisation so we keep track of them easily. Therefore there
is no need to allow the changing of the organisation

Email authentication - we may in time not allow these services to use
email auth to log in but this hasn't been decided so let's keep it for
the moment

Rate limit - although a service may end up using our API to create
broadcasts, there is currently no rate limit check on this endpoint
and it's also extremely unlikely that any service would ever breach
the default limit
2021-02-04 17:36:30 +00:00
Katie Smith
2bedcd79cc Merge pull request #3786 from alphagov/remove-link
Remove a link from using-notify page
2021-02-04 16:05:27 +00:00
Katie Smith
3ee16ecdbe Adjust test instruction 2021-02-04 15:21:29 +00:00
Katie Smith
1fdfd453f7 Remove a link from using-notify page
This stops the 'inset text' linking to the design system on the
'edit-and-format-messages' page. The link has been removed to avoid
confusion - someone thought they needed to use the design system
code in order to create inset text in templates.
2021-02-04 15:17:36 +00:00
Pea Tyczynska
5bc229222b Merge pull request #3779 from alphagov/show-billing-details-for-service
Show billing details for service
2021-02-03 10:52:50 +00:00
Pea Tyczynska
25534dbee3 Remove 'billing' from option labels
They were unnecessary it turned out.
2021-02-03 10:30:02 +00:00
Pea Tyczynska
0f6cbdf27e Add extra spacing to billing details and remove unnecessary autofocus
Add more spacing between characters for billing reference number and PO number, so they are easier to read. 

Also remove unnecessary autofocus.

Co-authored-by: Chris Hill-Scott <me@quis.cc>
2021-02-03 10:30:02 +00:00
Pea Tyczynska
c60be7000a Add notes to edit billing details page
As per ticket and as per Caley's request, so everything can be
edited together.

Also pluralise labels for billing contact info, to indicate
that putting multiple in is ok, and widen the input fields so
that it is more comfortable to input multiple contact details.
2021-02-03 10:30:02 +00:00
Pea Tyczynska
079f371bc5 Update attribute names following changes in API 2021-02-03 10:30:01 +00:00
Pea Tyczynska
8f21caa87a Change service billing details
View page that lets you change service billing details and
update details on form submission.
2021-02-03 10:30:01 +00:00
Pea Tyczynska
73031962a7 Change link leads to edit billing details view 2021-02-03 10:29:19 +00:00
Pea Tyczynska
d82f90754f Fix permissions for edit service note page 2021-02-03 10:29:18 +00:00
Pea Tyczynska
4a7bfcc9c5 Add billing details property
This property lets service settings know if there are any
billing details to preview.
2021-02-03 10:29:18 +00:00
Pea Tyczynska
8219e5a2f9 Show billing details row for admins on service settings page 2021-02-03 10:29:18 +00:00
Pea Tyczynska
f5e639050b Merge pull request #3784 from alphagov/notes-fix
Allow to update service notes
2021-02-02 17:37:27 +00:00
Pea Tyczynska
77008fe3cc Update requirements - install patch for jinja2 vulnerability 2021-02-02 17:13:18 +00:00
Pea Tyczynska
42b17d40b4 Test allowed attributes are really allowed 2021-02-02 16:38:56 +00:00
Tom Byers
0cedf39992 Merge pull request #3781 from alphagov/add-govuk-radios-7
Add GOVUK radios [part 7]
2021-02-02 11:40:53 +00:00
Pea Tyczynska
33dbfbaa65 Sort allowed attributes alphabetically 2021-02-01 17:36:04 +00:00
Pea Tyczynska
f107fe260a Allow to update service notes 2021-02-01 17:13:53 +00:00
Rebecca Law
8e66be6619 Merge pull request #3782 from alphagov/update-roadmap-january-21
Remove content for October to December 2020
2021-02-01 13:04:14 +00:00
karlchillmaid
af8535d972 Remove October to December 2020 2021-02-01 12:42:24 +00:00
Katie Smith
cbc8ec1a21 Merge pull request #3749 from alphagov/february-2021-postage-increases
Update letter prices
2021-02-01 08:22:06 +00:00
karlchillmaid
ed45cd18b0 Change p to pence 2021-02-01 08:11:51 +00:00
karlchillmaid
8d9774fc73 Change p to pence 2021-02-01 08:11:51 +00:00
karlchillmaid
3ddb49b9a1 Change p to pence 2021-02-01 08:11:51 +00:00
karlchillmaid
3728ec965c Update letter prices 2021-02-01 08:11:51 +00:00
karlchillmaid
624b8544b3 Update letter price content 2021-02-01 08:11:51 +00:00
karlchillmaid
441c03c1a4 Update prices 2021-02-01 08:11:51 +00:00
karlchillmaid
39eb8023e0 Update prices 2021-02-01 08:11:51 +00:00
karlchillmaid
0794792a6b Update letter price 2021-02-01 08:11:51 +00:00
karlchillmaid
a46fa22bd2 Update letter prices 2021-02-01 08:11:51 +00:00
Chris Hill-Scott
f34cd4a6b5 Merge pull request #3780 from alphagov/show-areas-not-in-library
Display areas that aren’t in the library
2021-01-28 10:21:12 +00:00
Tom Byers
0459cbe24f Merge pull request #3768 from alphagov/add-govuk-radios-6
Add GOVUK radios [part 6]
2021-01-27 14:54:30 +00:00
Chris Hill-Scott
926ada2f21 Check that all areas are in the library
We should assume to start with that areas come either from the library
or from the JSON, and not a combination of the two.
2021-01-27 14:32:35 +00:00
Chris Hill-Scott
5ae53b625b Show broadcasts created by the API
Broadcasts created by the API are different in that:
- they aren’t created by any user, so don’t have a `created_by_id`
- they are created instantly, not in steps, so don’t have an
  `updated_at` time

This commit alters the views to account for when these pieces of
information aren’t present.
2021-01-27 11:34:43 +00:00
Tom Byers
e013fbb9b3 Merge pull request #3770 from alphagov/fix-extend-params-bug
Fix bug with extend_params function
2021-01-27 10:52:51 +00:00
Tom Byers
3e39e6f019 Remove unused radio imports
The following were added without the macro ever
being called:
- app/templates/views/add-service-local.html
  (added in
  e6f49825e5)
- app/templates/views/service-settings/data-retention/edit.html
  (added in
  4b8b571a87)
- app/templates/views/organisations/organisation/settings/edit-domains.html
  (added in
  936883bf7b)

The following were used when they were first added
but not removed when the macro stopped being used:
- app/templates/views/edit-letter-template.html
  (macro removed in
  20ae200de9)
- app/templates/views/organisations/organisation/settings/edit-agreement.html
  (macro removed in
  45526598c6)
2021-01-27 10:52:24 +00:00
Tom Byers
513fbff6e0 Convert radios on set-template-sender page
Includes making the legend the h1 for the page to
follow design system guidance:

https://design-system.service.gov.uk/get-started/labels-legends-headings/
2021-01-27 10:52:24 +00:00
Tom Byers
ece956e324 Convert radios on set-sender page
Includes making the legend the page header to
follow design system guidance:

https://design-system.service.gov.uk/get-started/labels-legends-headings/

I had to add some override styles to allow the
legend to classes as a full-width column, and the
radios to be in one that is three-quarters.
2021-01-27 10:52:24 +00:00
Tom Byers
f6cef24617 Convert create API key radios to GOVUK Frontend 2021-01-27 10:52:24 +00:00
Tom Byers
31b344d6b4 Make radioSelect use GOVUK Frontend radios
Includes changing the code so that the radios
aren't split into two columns in the HTML present
when the page loads. This layout is now added by
the JS.
2021-01-26 21:14:48 +00:00
David McDonald
8e3aeea9a0 Merge pull request #3775 from alphagov/set-sender-bug
Fix bug with incorrect redirect to send_one_off
2021-01-26 13:54:18 +00:00
Tom Byers
67392e97ee Fix issue with looping in list merging
The last_dest_idx variable should always have been
tracking the last index in the source list. The
original intention, implemented incorrectly, was
to just append any items which source has no item
at that index.
2021-01-26 12:16:08 +00:00
Tom Byers
73afee8a12 Merge pull request #3771 from alphagov/fix-all-radios-forms-with-duplicate-legends
Fix all radios forms with duplicate legends
2021-01-26 10:57:39 +00:00
Chris Hill-Scott
60aa2d2b42 Display areas that aren’t in the library 2021-01-26 10:49:47 +00:00
Rebecca Law
68f7abd42f Merge pull request #3778 from alphagov/delete-all-template-version-cache
Fix bug with stale template cache
2021-01-25 16:47:22 +00:00
Rebecca Law
01a3df6edc Update _delete_template_cache_for_service to delete all template version cache and not just the one ending in "None"
Update all methods that were previous calling @cache.delete('service-{service-id}-template-None') to instead call _delete_template_cache_for_service
Remove call to get service templates, it's not needed since all template version cache is being deleted.
2021-01-25 16:28:20 +00:00
David McDonald
9e477011d3 Fix bug with incorrect redirect to send_one_off
If a user has only send_message permissions, when they click on a
template name they are currently taken to the `send_one_off` page. This
is incorrect as if there is more than one SMS sender or email reply to
address, then they should pick the address they wish to use.

This commit fixes that bug by redirecting them to the `set_sender`
route. Note, if there is only one sender then the `set_sender` will
redirect the user on to the `send_one_off` route.

https://www.pivotaltracker.com/story/show/176541486
2021-01-22 18:34:30 +00:00
Tom Byers
1059cf4d81 Remove extend_params in favour of merge_jsonlike
A comment on the pull request for this branch
pointed out that it's not clear why the 'items'
list is deleted and then reassigned in
extend_params:

https://github.com/alphagov/notifications-admin/pull/3770#pullrequestreview-573067465

The simple reason is that we want to use
merge_jsonlike to merge params and
param_extensions (passed in as extensions) but
merge_jsonlike doesn't merge lists correctly.

I realised that if we just make merge_jsonlike
merge lists correctly, we can use it for
everything extend_params does.

This commit does that, and replaces all calls to
extend_params with merge_jsonlike.

Because extend_params is used across many form
field classes, and so many pages, I took the
following precautions after making those changes:
1. found every use of param_extensions
2. looked at the merges onto params that each would
   cause and deduped them to a final list of 6(!)
3. tested pages containing fields from that list
4. added new testcases to the merge_jsonlike tests
   for any merges that exist in our codebase but
   not in our tests
2021-01-22 15:40:28 +00:00