Commit Graph

3932 Commits

Author SHA1 Message Date
Chris Hill-Scott
b73e42650d Refactor hex colour preview Javascript
This commit improves the code that previews a hex colour when setting up
or changing an email branding.

Specifically it:
- refactors the Javascript to conform to our patterns (module pattern,
  preprocessed with Gulp)
- makes the code work when there are multiple colour previews on one
  page

It also does some visual prettifying, because I couldn’t help myself…
2018-08-22 16:31:05 +01:00
Chris Hill-Scott
864e732c38 Merge pull request #2241 from alphagov/add-colours-and-domain-to-email-branding
New columns for email branding
2018-08-22 16:29:42 +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
Chris Hill-Scott
7530fbf731 Fix the tests and catch a few more examples 2018-08-20 18:05:46 +01:00
karlchillmaid
36e8a9b3cc Corrected the page title
Corrected the page title to 'Data retention'
2018-08-20 16:59:35 +01:00
karlchillmaid
60f64ee5e5 'Email reply-to address' updated
Updated 'reply-to address' to include a hyphen
2018-08-20 16:50:56 +01:00
karlchillmaid
e18f1727d1 'Email reply-to addresses' updated
Updated 'reply-to address' to include a hyphen
2018-08-20 16:48:21 +01:00
karlchillmaid
2c635faf5f 'Email reply-to address' updated
Updated 'reply-to address' to include a hyphen
2018-08-20 16:46:28 +01:00
karlchillmaid
15ed2e624a 'Email reply-to address' updated
Updated 'reply-to address' to include a hyphen
2018-08-20 16:45:08 +01:00
karlchillmaid
fb717e6933 'Email reply-to address' updated
Updated 'reply-to address' to include a hyphen
2018-08-20 16:43:42 +01:00
karlchillmaid
abed956a5a 'Email reply-to address' label change
Updated 'reply-to address' to include a hyphen
2018-08-20 16:41:16 +01:00
Rebecca Law
3fda171f80 New columns for email branding
Added banner_colour, single_id_colour and domain to email branding view. Now able to set the fields.

However, the new fields are not being used yet.
2018-08-20 13:27:17 +01:00
fidejoseph
3fbe85cdf8 Update email_domains.yml
update: hscni.net
2018-08-20 12:14:03 +01:00
Pete Herlihy
bbccbd8784 Adding derrystrabane.com (local council)
For *reasons* they've gone with dot com addresses.
2018-08-17 15:12:24 +01:00
Katie Smith
43e3ddb73a Merge pull request #2233 from alphagov/increase-sms-length
Increase SMS maximum length from 459 to 612
2018-08-17 14:03:29 +01:00
Katie Smith
6b5eaf7fff Improve number formatting on platform-admin page
Minor changes to the number formatting for the `/platform-admin` page to
- Show the complaint percentage to 2 decimal places. (The number of
complaints is often below 0.0% so 1 decimal place isn't useful)
- Format the numbers in the status boxes to use a comma as a thousands
separator.
2018-08-16 16:57:02 +01:00
Katie Smith
1b6c357dea Use new value of SMS_CHAR_COUNT_LIMIT from utils
Admin, API and utils were all defining a value for SMS_CHAR_COUNT_LIMIT.
This value has been updated in notifications-utils to allow text
messages to be 4 fragments long and notifications-admin now gets the value of
SMS_CHAR_COUNT_LIMIT from notifications-utils instead of defining it in
config.
2018-08-16 16:56:32 +01:00
Tom Byers
6249f4826b Merge pull request #2235 from alphagov/sort-branding-radios-alphabetically
Sort branding radios alphabetically
2018-08-16 16:49:12 +01:00
Alexey Bezhan
3a00574034 Merge pull request #2224 from alphagov/notifications-page-data-retention-period
Notifications page data retention period
2018-08-16 13:55:55 +01:00
Tom Byers
f85a9306a6 Move brandings sort into email_branding_client 2018-08-16 13:40:24 +01:00
Pete Herlihy
d5bd220378 Adding fire-uk.org to the list of domains 2018-08-15 16:35:59 +01:00
Tom Byers
853f13c70b Sort email branding selection alphabetically
For branding combinations in service settings and
branding creation/editing in platform admin.
2018-08-15 16:13:27 +01:00
Sakis
85ec7a28cb Merge pull request #2231 from alphagov/zipkin-headers
Both trace_id and span_id headers must be present
2018-08-15 16:10:09 +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
Athanasios Voutsadakis
984e09cc6a Both trace_id and span_id headers must be present 2018-08-14 18:12:06 +01:00
Tom Byers
8ba8606963 Merge pull request #2230 from alphagov/add-branding-name-to-ui
Show the 'name' of the email branding in the adding and editing screens
2018-08-14 16:05:56 +01:00
Rebecca Law
2e98c9c562 Merge pull request #2225 from alphagov/308-331
Updated count of services and orgs
2018-08-14 15:58:00 +01:00
Tom Byers
fafe03e9f0 Remove unused imports for branding_radio macro
Found while grepping for use of the branding_radio
macro.
2018-08-14 14:18:16 +01:00
Tom Byers
f6642aa6e3 Remove branding_radios macro
No longer used by any template so remove.

(It'll still be in the history if we need it.)
2018-08-14 14:18:16 +01:00
Tom Byers
7c398a8a2f Update style radios for choosing brand combination
They were already using the 'name' field in their
label but we don't want any other part of the
branding to appear now.
2018-08-14 14:18:16 +01:00
Tom Byers
1269071da2 Add 'name' field to brand creation/edit page 2018-08-14 14:18:16 +01:00
Tom Byers
eb64033ff3 Update selection radios before edit/create new
They were already using the 'name' field in their
label but we don't want any other part of the
branding to appear now.
2018-08-14 14:18:16 +01:00
Sakis
54304a3498 Merge pull request #2228 from alphagov/zipkin-headers
Use the zipkin headers from utils version 30.0.0
2018-08-14 14:15:09 +01:00
Athanasios Voutsadakis
6786ff8fde Use the zipkin headers from utils version 30.0.0 2018-08-14 13:20:21 +01:00
Katie Smith
5b7ca676b5 Make the new Ruby docs live
The Ruby docs are now finished, so we can change the documentation link
to point to the new docs.
2018-08-14 10:55:02 +01:00
Pete Herlihy
8e36efca55 Updated count of services and orgs
Now 331 from 108 organisations.
2018-08-14 10:30:37 +01:00
Alexey Bezhan
e3a0adc293 Use per-service data retention period to display notifications page
Uses the configured service data retention page to display retention
period length, notification counts and fetch notifications from the
API on the notifications page.
2018-08-13 17:07:49 +01:00
Alexey Bezhan
52d48ad679 Add API client method to fetch service data retention by type 2018-08-13 17:06:16 +01:00
Alexey Bezhan
28b03fe748 Add limit_days argument to statistics API client method
Allows getting notification counts for a given number of days to
support services with custom data retention periods (admin
dashboard page should still display counts for the last 7 days,
while the notifications page displays all stored notifications).
2018-08-13 17:04:40 +01:00
Katie Smith
a978a2fbe5 Refactor contact link template 2018-08-13 13:40:03 +01:00
Katie Smith
979fd9bbe4 Allow service contact details to be phone number, email or url
Service contact details are needed if the upload document permission is
enabled - this used to be a link but services can now choose to use a
link, email address or phone number. The form to add or change service
contact details now gives these options and validates the data according
to the type of contact details provided.

When validating phone numbers we can't use the existing validation
because we want to allow landlines too, so there is a basic check that
the phone number is the right length and doesn't include certain
characters.
2018-08-13 10:33:39 +01:00
Chris Hill-Scott
89795186ec Merge pull request #2217 from alphagov/remove-basic-view
Remove basic view setting and preview
2018-08-10 17:04:19 +01:00
Chris Hill-Scott
2573aacae8 Merge pull request #2216 from alphagov/fix-back-link-template-skip
Fix ‘Back’ link from first step of one off
2018-08-10 17:02:23 +01:00
Chris Hill-Scott
ec69aa6c39 Merge pull request #2214 from alphagov/sort-services-alpha-on-copy
Sort services alphabetically when copying template
2018-08-10 16:59:00 +01:00
Chris Hill-Scott
5a52eafb84 Fix ‘Back’ link from first step of fix one off
If you skip past the templates page (because you don’t have the edit
permission) but then click back you end up in a loop which redirects you
to the page you’re already on.

This commit makes sure that you’re sent back a step further, so you
don’t get stuck in that loop.
2018-08-10 09:16:18 +01:00
Chris Hill-Scott
fdf3670661 Remove basic view setting and preview 2018-08-09 17:51:34 +01:00
Chris Hill-Scott
61507fda8f Make the permission labels shorter
They were feeling a bit heavy on the _Team members_ page. We can remove
some words without losing any meaning.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
347912876c Relabel existing permissions
Since we have added a new, 5th permission the existing permissions
should be relabelled so that the five make sense as a coherent set.

We especially want to make sure that:
- the labels work against the checkboxes and against the tick/crosses on
  the manage users page (a long time ago this page was layed out
  differently so didn’t have space for full labels)
- there is no confusion between usage and reports

This commit also:
- re-adds a line about what all users can see (‘sent messages’) but
  continues to omit the additional bullet points about templates and
  team members (because we think this is clear enough from reading the
  permissions)
- refactors the `Form` subclass so that the content and order of the
  permissions only have to be defined once
- brings back the ‘permissions’ legend on the `fieldset`
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
5108187cab Show letters in basic view
We were taking letters away from basic view because there’s no one-off
sending of letters.

But now that basic view isn’t an opt-in thing but something we’re
rolling out to all users who only have the ‘send’ permission it feels
like too drastic a change to remove letters.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
3e14e5e52b Don’t skip template page for letters
It’s too jarring to go straight from the list of templates to the upload
addresses page. So while we don’t have sending a one-off letter as a
thing, let’s keep the template page.
2018-08-09 13:49:06 +01:00