mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Move request to go live notes into template
We can make the `as_agreement_statement_for_go_live_request` method less complex by offloading some of the content it returns to the presentation layer.
This commit is contained in:
@@ -103,9 +103,9 @@ class Organisation(JSONModel):
|
|||||||
|
|
||||||
def as_agreement_statement_for_go_live_request(self, fallback_domain):
|
def as_agreement_statement_for_go_live_request(self, fallback_domain):
|
||||||
if self.agreement_signed:
|
if self.agreement_signed:
|
||||||
agreement_statement = 'Yes, on behalf of {}.'.format(self.name)
|
return 'Yes, on behalf of {}.'.format(self.name)
|
||||||
elif self.name:
|
if self.name:
|
||||||
agreement_statement = '{} (organisation is {}, {}).'.format(
|
return '{} (organisation is {}, {}).'.format(
|
||||||
{
|
{
|
||||||
False: 'No',
|
False: 'No',
|
||||||
None: 'Can’t tell',
|
None: 'Can’t tell',
|
||||||
@@ -117,13 +117,7 @@ class Organisation(JSONModel):
|
|||||||
None: 'crown status unknown',
|
None: 'crown status unknown',
|
||||||
}.get(self.crown),
|
}.get(self.crown),
|
||||||
)
|
)
|
||||||
else:
|
return 'Can’t tell (domain is {}).'.format(fallback_domain)
|
||||||
agreement_statement = 'Can’t tell (domain is {}).'.format(fallback_domain)
|
|
||||||
|
|
||||||
if self.request_to_go_live_notes:
|
|
||||||
agreement_statement = agreement_statement + ' ' + self.request_to_go_live_notes
|
|
||||||
|
|
||||||
return agreement_statement
|
|
||||||
|
|
||||||
def as_info_for_branding_request(self, fallback_domain):
|
def as_info_for_branding_request(self, fallback_domain):
|
||||||
return self.name or 'Can’t tell (domain is {})'.format(fallback_domain)
|
return self.name or 'Can’t tell (domain is {})'.format(fallback_domain)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Service: {{ current_service.name }}
|
|||||||
---
|
---
|
||||||
Organisation type: {{ current_service.organisation_type_label }}
|
Organisation type: {{ current_service.organisation_type_label }}
|
||||||
Agreement signed: {{ current_service.organisation.as_agreement_statement_for_go_live_request(current_user.email_domain) }}
|
Agreement signed: {{ current_service.organisation.as_agreement_statement_for_go_live_request(current_user.email_domain) }}
|
||||||
|
{%- 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 %}
|
{%- if current_service.organisation.agreement_signed_by %}
|
||||||
Agreement signed by: {{ current_service.organisation.agreement_signed_by.email_address }}
|
Agreement signed by: {{ current_service.organisation.agreement_signed_by.email_address }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|||||||
Reference in New Issue
Block a user