mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Link to the page to download the agreement
We prefer people downloading the agreement if they can. If we don’t know which agreement they should be using (ie we don’t know their crown status) then we fall back to having them contact us.
This commit is contained in:
@@ -20,21 +20,12 @@ Terms of use
|
||||
These terms apply to your service’s use of GOV.UK Notify. You must be the service manager to accept them.
|
||||
</p>
|
||||
|
||||
{% if agreement_info.agreement_signed %}
|
||||
<p>Your organisation ({{ agreement_info.owner }}) has already accepted the GOV.UK Notify data sharing and financial agreement.</p>
|
||||
{% else %}
|
||||
<p>
|
||||
Your organisation
|
||||
{% if agreement_info.owner %}
|
||||
({{ agreement_info.owner }})
|
||||
must also accept our data sharing and financial agreement.
|
||||
<a href="{{ url_for('.feedback', ticket_type='ask-question-give-feedback', body='agreement-with-owner') }}">Contact us</a> to get a copy.
|
||||
{% else %}
|
||||
must also accept our data sharing and financial agreement.
|
||||
<a href="{{ url_for('.feedback', ticket_type='ask-question-give-feedback', body='agreement') }}">Contact us</a> to get a copy.
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
{{ agreement_info.as_terms_of_use_paragraph(
|
||||
download_link=url_for('.agreement'),
|
||||
contact_link=url_for('.feedback', ticket_type='ask-question-give-feedback', body='agreement-with-owner')
|
||||
)}}
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">When using Notify</h2>
|
||||
<p>You must:</p>
|
||||
|
||||
40
app/utils.py
40
app/utils.py
@@ -15,7 +15,15 @@ import dateutil
|
||||
import pyexcel
|
||||
import pytz
|
||||
import yaml
|
||||
from flask import abort, current_app, redirect, request, session, url_for
|
||||
from flask import (
|
||||
Markup,
|
||||
abort,
|
||||
current_app,
|
||||
redirect,
|
||||
request,
|
||||
session,
|
||||
url_for,
|
||||
)
|
||||
from flask_login import current_user
|
||||
from notifications_utils.recipients import RecipientCSV
|
||||
from notifications_utils.template import (
|
||||
@@ -464,6 +472,36 @@ class AgreementInfo:
|
||||
else:
|
||||
return 'Can’t tell'
|
||||
|
||||
def as_terms_of_use_paragraph(self, **kwargs):
|
||||
return Markup(self._as_terms_of_use_paragraph(**kwargs))
|
||||
|
||||
def _as_terms_of_use_paragraph(self, download_link, contact_link):
|
||||
|
||||
if self.agreement_signed:
|
||||
return (
|
||||
'Your organisation ({}) has already accepted the '
|
||||
'GOV.UK Notify data sharing and financial '
|
||||
'agreement.'.format(self.owner)
|
||||
)
|
||||
|
||||
if self.crown_status is not None:
|
||||
return ((
|
||||
'{} <a href="{}">Download a copy</a>.'
|
||||
).format(self._acceptance_required, download_link))
|
||||
|
||||
return ((
|
||||
'{} <a href="{}">Contact us</a> to get a copy.'
|
||||
).format(self._acceptance_required, contact_link))
|
||||
|
||||
@property
|
||||
def _acceptance_required(self):
|
||||
return (
|
||||
'Your organisation {} must also accept our data sharing '
|
||||
'and financial agreement.'.format(
|
||||
'({})'.format(self.owner) if self.owner else '',
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def crown_status_or_404(self):
|
||||
if self.crown_status is None:
|
||||
|
||||
Reference in New Issue
Block a user