From 98e97497716947badccec88c2625be679d6851c8 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 11 Oct 2021 15:42:29 +0100 Subject: [PATCH] =?UTF-8?q?Refactor=20to=20put=20yes/no/can=E2=80=99t=20te?= =?UTF-8?q?ll=20in=20one=20place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code is a bit easier to follow if the same output is always coming from the same statement in the code. --- app/templates/go-live-request.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/templates/go-live-request.txt b/app/templates/go-live-request.txt index 7f6296d30..265986df6 100644 --- a/app/templates/go-live-request.txt +++ b/app/templates/go-live-request.txt @@ -3,11 +3,11 @@ Service: {{ current_service.name }} --- Organisation type: {{ current_service.organisation_type_label }} -Agreement signed: -{%- if current_service.organisation.agreement_signed %} Yes, on behalf of {{ current_service.organisation.name }}. -{%- elif current_service.organisation.name %} {{ current_service.organisation.agreement_signed|format_yes_no(none='Can’t tell') }} (organisation is {{ current_service.organisation.name }}, {{ current_service.organisation.crown|format_yes_no(yes='a crown body', no='a non-crown body', none='crown status unknown') }}). -{%- else %} Can’t tell (domain is {{ current_user.email_domain }}). -{%- endif %} +Agreement signed: {{ current_service.organisation.agreement_signed|format_yes_no(none='Can’t tell') }} +{%- if current_service.organisation.agreement_signed %}, on behalf of {{ current_service.organisation.name }} +{%- elif current_service.organisation.name %} (organisation is {{ current_service.organisation.name }}, {{ current_service.organisation.crown|format_yes_no(yes='a crown body', no='a non-crown body', none='crown status unknown') }}) +{%- else %} (domain is {{ current_user.email_domain }}) +{%- endif %}. {%- if current_service.organisation.request_to_go_live_notes %} {{ current_service.organisation.request_to_go_live_notes }}{% endif %} {%- if current_service.organisation.agreement_signed_by %} Agreement signed by: {{ current_service.organisation.agreement_signed_by.email_address }}