Customise download page if agreement signed

If the user’s organisation has already signed the agreement we shouldn’t
give them the instructions for how to sign it.
This commit is contained in:
Chris Hill-Scott
2018-05-09 13:10:01 +01:00
parent dc6d66daba
commit 220e11ccdd
3 changed files with 40 additions and 1 deletions

View File

@@ -20,6 +20,13 @@ def agreement():
navigation_links=features_nav(),
)
if agreement_info.agreement_signed:
return render_template(
'views/agreement-signed.html',
owner=agreement_info.owner,
navigation_links=features_nav(),
)
return render_template(
'views/agreement.html',
owner=agreement_info.owner,

View File

@@ -0,0 +1,33 @@
{% extends "withoutnav_template.html" %}
{% from "components/sub-navigation.html" import sub_navigation %}
{% block per_page_title %}
Download the GOV.UK Notify data sharing and financial agreement
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-one-third">
{{ sub_navigation(navigation_links) }}
</div>
<div class="column-two-thirds">
<h1 class="heading-large">
Download the GOV.UK Notify data sharing and financial agreement
</h1>
<p>
Your organisation ({{ owner }}) has already accepted the GOV.UK
Notify data sharing and financial agreement.
</p>
<p>
If you need to you can <a href="{{ url_for('main.download_agreement') }}">download a copy here</a>.
</p>
<p>
The agreement contains commercially sensitive information, so dont share it more widely than you need to.
</p>
</div>
</div>
{% endblock %}

View File

@@ -21,7 +21,6 @@ class _MockS3Object():
'test@cabinet-office.gov.uk',
[
partial(url_for, 'main.download_agreement'),
lambda: 'mailto:notify-support@digital.cabinet-office.gov.uk',
]
),
(