Skip to content

Commit

Permalink
FS-4071: Add contact_us changes to round model (#295)
Browse files Browse the repository at this point in the history
* FS-4071: Contact us page changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* FS-4071: Update HSRA config

* FS-4071: Fix tiny pre-commit linting issue

* Update db/migrations/versions/~2024_04_08_1127-e439c3fdea6d_.py

* Update db/migrations/versions/~2024_04_22_1728-8e4d1e36ebbf_.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tferns and pre-commit-ci[bot] authored May 1, 2024
1 parent da76d87 commit a47bcb8
Show file tree
Hide file tree
Showing 15 changed files with 451 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def filter_fund(data):
def filter_round_by_lang(round_data, lang_key: str = "en"):
def filter_round(data):
data["title"] = data["title_json"].get(lang_key) or data["title_json"]["en"]
data["contact_us_banner"] = (
data["contact_us_banner_json"].get(lang_key) or data["contact_us_banner_json"].get("en")
if data["contact_us_banner_json"]
else ""
)
data["instructions"] = (
data["instructions_json"].get(lang_key) or data["instructions_json"].get("en")
if data["instructions_json"]
Expand Down
84 changes: 84 additions & 0 deletions config/fund_loader_config/cof/cof_r2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa
import textwrap
from datetime import datetime
from datetime import timezone

Expand Down Expand Up @@ -38,6 +40,47 @@
"community-ownership-fund-privacy-notice"
),
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down Expand Up @@ -100,6 +143,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-privacy-notice/"
"community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down
125 changes: 125 additions & 0 deletions config/fund_loader_config/cof/cof_r3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa
import textwrap
from datetime import datetime
from datetime import timezone

Expand Down Expand Up @@ -728,6 +730,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-"
"privacy-notice/community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down Expand Up @@ -790,6 +833,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-"
"privacy-notice/community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down Expand Up @@ -852,6 +936,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-"
"privacy-notice/community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down
43 changes: 43 additions & 0 deletions config/fund_loader_config/cof/cof_r4.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa
import textwrap
from datetime import datetime
from datetime import timezone

Expand Down Expand Up @@ -248,6 +250,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-"
"privacy-notice/community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down
43 changes: 43 additions & 0 deletions config/fund_loader_config/cof/eoi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# flake8: noqa
import textwrap
from datetime import datetime
from datetime import timezone

Expand Down Expand Up @@ -122,6 +124,47 @@
"https://www.gov.uk/government/publications/community-ownership-fund-"
"privacy-notice/community-ownership-fund-privacy-notice"
),
"reference_contact_page_over_email": True,
"contact_us_banner_json": {
"en": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
"cy": textwrap.dedent(
"""
<h2 class="govuk-heading-m">Get application support</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund">Visit the My Community website</a>
for information and guidance on applying to Community Ownership Fund.
<a class="govuk-link" href="https://mycommunity.org.uk/community-ownership-fund#enquiry-form">Fill out the enquiry form</a>
to request advice from My Community.
</p>
<p class="govuk-body">
We cannot provide direct support to applicants outside of this service.
</p>
<h2 class="govuk-heading-m">Get technical support</h2>
<p class="govuk-body">
Contact the Department of Levelling Up, Housing and Communities funding team if you need
help with accessing or submitting an application form.
</p>
"""
),
},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down
2 changes: 2 additions & 0 deletions config/fund_loader_config/cyp/cyp_r1.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@
"assessment_deadline": CYP_R1_ASSESSMENT_DEADLINE_DATE,
"prospectus": CYP_PROSPECTS_LINK,
"privacy_notice": "https://www.gov.uk/guidance/the-children-and-young-peoples-resettlement-fund-privacy-notice",
"reference_contact_page_over_email": False,
"contact_us_banner_json": {"en": "", "cy": ""},
"contact_email": "[email protected]",
"contact_phone": None,
"contact_textphone": None,
Expand Down
Loading

0 comments on commit a47bcb8

Please sign in to comment.