Remove dependence on domains.yml from static pages

This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
This commit is contained in:
Chris Hill-Scott
2019-04-04 11:12:53 +01:00
parent 718f440720
commit 72f49a9a1e
6 changed files with 50 additions and 20 deletions

View File

@@ -16,7 +16,7 @@ from app import email_branding_client, letter_branding_client
from app.main import main
from app.main.forms import FieldWithNoneOption, SearchByNameForm
from app.main.views.sub_navigation_dictionaries import features_nav
from app.utils import AgreementInfo, get_logo_cdn_domain
from app.utils import get_logo_cdn_domain
@main.route('/')
@@ -75,7 +75,6 @@ def pricing():
for cc, country in INTERNATIONAL_BILLING_RATES.items()
], key=lambda x: x[0]),
search_form=SearchByNameForm(),
agreement_info=AgreementInfo.from_current_user(),
)
@@ -249,7 +248,6 @@ def terms():
return render_template(
'views/terms-of-use.html',
navigation_links=features_nav(),
agreement_info=AgreementInfo.from_current_user(),
)

View File

@@ -123,7 +123,7 @@
<h2 class="heading-medium" id="paying">How to pay</h2>
<p>You can find details of how to pay for Notify in our data sharing and financial agreement.</p>
<p>
{{ agreement_info.as_pricing_paragraph(
{{ current_user.default_organisation.as_pricing_paragraph(
pricing_link=url_for('main.sign_in', next=url_for('main.pricing', _anchor='paying')),
download_link=url_for('main.agreement'),
support_link=url_for('.feedback', ticket_type='ask-question-give-feedback', body='agreement'),

View File

@@ -21,7 +21,7 @@ Terms of use
</p>
<p>
{{ agreement_info.as_terms_of_use_paragraph(
{{ current_user.default_organisation.as_terms_of_use_paragraph(
terms_link=url_for('main.sign_in', next=url_for('main.terms')),
download_link=url_for('.agreement'),
support_link=url_for('.feedback', ticket_type='ask-question-give-feedback', body='agreement'),