From 23afe6fe3614f128f3b8c0280ec53d7713809605 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 26 Aug 2020 15:48:15 +0100 Subject: [PATCH] Fix letter contact details page --- .../letter-contact-details.html | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/app/templates/views/service-settings/letter-contact-details.html b/app/templates/views/service-settings/letter-contact-details.html index 0cf921156..a16ea0e1e 100644 --- a/app/templates/views/service-settings/letter-contact-details.html +++ b/app/templates/views/service-settings/letter-contact-details.html @@ -18,30 +18,41 @@
- - Blank - {% if current_service.default_letter_contact_block %} - {% if current_user.has_permissions('manage_service') %} - Make default +
+
+

+ Blank + {% if not current_service.default_letter_contact_block %} + (default) + {% endif %} +

+
+
+ {% if current_service.default_letter_contact_block and current_user.has_permissions('manage_service') %} + Make default {% endif %} - {% else %} - (default) - {% endif %} - +
+
{% for item in letter_contact_details %}
-

- {{ item.contact_block | nl2br }} -

-

- {%- if item.is_default -%} - (default) - {% endif %} -

- {% if current_user.has_permissions('manage_service') %} - Change - {% endif %} +
+
+

+ {{ item.contact_block | nl2br }} +

+

+ {%- if item.is_default -%} + (default) + {% endif %} +

+
+
+ {% if current_user.has_permissions('manage_service') %} + Change + {% endif %} +
+
{% if letter_contact_details|length > 1 %} {% set first_line_of_contact_block = item.contact_block|normalise_lines|first %} {{ api_key(item.id, name=first_line_of_contact_block, thing="ID") }}