Refactor go-live readyness into service model

All this info is info about the service. So it’s better to put it on
the service model because:
- encapsulation
- later reuse
This commit is contained in:
Chris Hill-Scott
2018-09-20 09:43:28 +01:00
parent d753e8351c
commit 45b1b11abb
4 changed files with 57 additions and 31 deletions

View File

@@ -16,30 +16,30 @@
<h1 class="heading-large">Before you request to go live</h1>
{% call task_list_wrapper() %}
{{ task_list_item(
has_team_members,
current_service.has_team_members,
'<a href="{}">Add a team member who can manage settings, team and usage</a>
'.format(
url_for('main.manage_users', service_id=current_service.id)
)|safe,
) }}
{{ task_list_item(
has_templates,
current_service.has_templates,
'<a href="{}">Add templates with examples of the content you plan to send
</a>'.format(
url_for('main.choose_template', service_id=current_service.id)
)|safe,
) }}
{% if has_email_templates %}
{% if current_service.has_email_templates %}
{{ task_list_item(
has_email_reply_to_address,
current_service.has_email_reply_to_address,
'<a href="{}">Add an email reply-to address</a>'.format(
url_for('main.service_email_reply_to', service_id=current_service.id)
)|safe,
) }}
{% endif %}
{% if has_sms_templates and shouldnt_use_govuk_as_sms_sender %}
{% if current_service.has_sms_templates and current_service.shouldnt_use_govuk_as_sms_sender %}
{{ task_list_item(
not sms_sender_is_govuk,
not current_service.sms_sender_is_govuk,
'<a href="{}">Change your text message sender name</a>'.format(
url_for('main.service_sms_senders', service_id=current_service.id)
)|safe