diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 88f353a..af89b30 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,9 +23,8 @@ repos:
hooks:
- id: mypy
additional_dependencies: [types-jmespath, types-requests, types-beautifulsoup4, types-flask, types-python-dateutil]
-# - repo: https://github.com/Riverside-Healthcare/djLint
-# rev: v1.24.0
-# hooks:
-# - id: djlint-jinja
-# types_or: ['html', 'jinja']
-# TODO: turn this back on and fix issues
+- repo: https://github.com/Riverside-Healthcare/djLint
+ rev: v1.34.1
+ hooks:
+ - id: djlint-jinja
+ types_or: ['html', 'jinja']
diff --git a/app/templates/base.html b/app/templates/base.html
index c39b25e..39d1e15 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -1,23 +1,23 @@
-{% extends 'govuk_frontend_jinja/template.html' %}
+{% extends "govuk_frontend_jinja/template.html" %}
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-{%- from 'govuk_frontend_jinja/components/error-summary/macro.html' import govukErrorSummary-%}
+{%- from 'govuk_frontend_jinja/components/error-summary/macro.html' import govukErrorSummary -%}
{%- from 'govuk_frontend_jinja/components/notification-banner/macro.html' import govukNotificationBanner -%}
{%- from 'govuk_frontend_jinja/components/phase-banner/macro.html' import govukPhaseBanner -%}
{%- from 'govuk_frontend_jinja/components/header/macro.html' import govukHeader -%}
{% set assetPath = url_for('static', filename='').rstrip('/') %}
-{% block pageTitle %}{{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}{{ config['SERVICE_NAME'] }} – GOV.UK{% endblock pageTitle %}
{% block head %}
-
+
-
+
{% assets "css" %} {% endassets %}
-{% endblock %}
+{% endblock head %}
{% block header %}
{{ govukHeader({
@@ -25,7 +25,7 @@
'serviceUrl': url_for('main.download'),
'serviceName': config['SERVICE_NAME'],
}) }}
-{% endblock %}
+{% endblock header %}
{% block beforeContent %}
{% block phaseBanner %}
@@ -35,12 +35,10 @@
},
'html': 'This is a new service – your feedback will help us to improve it.'
}) }}
- {% endblock %}
+ {% endblock phaseBanner %}
- {% if request.path in [url_for('main.download'), url_for('main.start_page')] %}
-
- {% else %}
+ {% if request.path not in [url_for('main.download'), url_for('main.start_page')] %}
{{ govukBackLink({
'text': 'Back',
'href': url_for('main.download')
@@ -52,7 +50,7 @@
Log out
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
{% if form and form.errors %}
@@ -66,7 +64,7 @@
{% endfor %}
{% endif %}
{% endwith %}
-{% endblock %}
+{% endblock content %}
{% block footer %}
-{% endblock %}
+{% endblock content %}
{% block bodyEnd %}
@@ -104,4 +102,4 @@ Support links
{% assets "js" %}{% endassets %}
-{% endblock %}
+{% endblock bodyEnd %}
diff --git a/app/templates/main/404.html b/app/templates/main/404.html
index 171608b..4c07f95 100644
--- a/app/templates/main/404.html
+++ b/app/templates/main/404.html
@@ -2,8 +2,7 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-
-{% block pageTitle %}Page not found – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}Page not found – {{ config['SERVICE_NAME'] }} – GOV.UK{% endblock pageTitle %}
{% set mainClasses = "govuk-main-wrapper--l" %}
@@ -12,10 +11,9 @@
'text': "Back",
'href': url_for('main.download')
}) }}
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
-
Page not found
@@ -23,4 +21,4 @@
Page not found
If you pasted the web address, check you copied the entire address.
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/429.html b/app/templates/main/429.html
index 21dec96..913a434 100644
--- a/app/templates/main/429.html
+++ b/app/templates/main/429.html
@@ -2,8 +2,9 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-
-{% block pageTitle %}Too many requests – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}
+ Too many requests – {{ config['SERVICE_NAME'] }} – GOV.UK
+{% endblock pageTitle %}
{% set mainClasses = "govuk-main-wrapper--l" %}
@@ -12,7 +13,7 @@
'text': "Back",
'href': url_for('main.download')
}) }}
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
@@ -22,4 +23,4 @@
Sorry, there is a problem
Try again later.
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/500.html b/app/templates/main/500.html
index 30b1b76..c7e5d21 100644
--- a/app/templates/main/500.html
+++ b/app/templates/main/500.html
@@ -2,8 +2,9 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-
-{% block pageTitle %}Sorry, there is a problem with the service – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}
+ Sorry, there is a problem with the service – {{ config['SERVICE_NAME'] }} – GOV.UK
+{% endblock pageTitle %}
{% set mainClasses = "govuk-main-wrapper--l" %}
@@ -12,7 +13,7 @@
'text': "Back",
'href': url_for('main.download')
}) }}
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
@@ -21,4 +22,4 @@
Sorry, there is a problem with the service
Try again later.
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/503.html b/app/templates/main/503.html
index 69ae57a..c8b430d 100644
--- a/app/templates/main/503.html
+++ b/app/templates/main/503.html
@@ -2,8 +2,7 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-
-{% block pageTitle %}Sorry, the service is unavailable – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}Sorry, the service is unavailable – {{ config['SERVICE_NAME'] }} – GOV.UK{% endblock pageTitle %}
{% set mainClasses = "govuk-main-wrapper--l" %}
@@ -12,7 +11,7 @@
'text': "Back",
'href': url_for('main.download')
}) }}
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
@@ -21,4 +20,4 @@
Sorry, the service is unavailable
You will be able to use the service from 9am on Monday 19 November 2018.
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/accessibility.html b/app/templates/main/accessibility.html
index f77359c..ffc77d3 100644
--- a/app/templates/main/accessibility.html
+++ b/app/templates/main/accessibility.html
@@ -3,13 +3,15 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
{%- from 'govuk_frontend_jinja/components/inset-text/macro.html' import govukInsetText -%}
-{% block pageTitle %}Accessibility statement – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}
+ Accessibility statement – {{ config['SERVICE_NAME'] }} – GOV.UK
+{% endblock pageTitle %}
{% block content %}
{{ super() }}
-
Accessibility statement for {{config['SERVICE_NAME']}}
+
Accessibility statement for {{ config['SERVICE_NAME'] }}
{{ govukInsetText({
'text': "Note: start with a brief explanation of which websites or mobile apps the statement covers.
@@ -17,13 +19,13 @@
Accessibility statement for {{config['SERVICE_NAME'
You can have a single accessibility statement that covers multiple domains, or a separate statement for each domain or subdomain. As long as the user can access relevant accessibility information easily from any page on your website."
}) }}
- This accessibility statement applies to {{config['SERVICE_URL']}}.
+
This accessibility statement applies to {{ config['SERVICE_URL'] }}.
{{ govukInsetText({
'text': "Note: use this section to make a brief, general statement about what the website allows disabled users to do. Base it on the evaluation covered in detail in the ‘Technical information about this website’s accessibility’ section. If you’re not confident that something is accurate, leave it out. If you’re not confident enough to say anything specific here, leave this section out completely."
}) }}
-
This website is run by {{config['DEPARTMENT_NAME']}}. We want as many people as possible to be able
+
This website is run by {{ config['DEPARTMENT_NAME'] }}. We want as many people as possible to be able
to use this website. For example, that means you should be able to:
change colours, contrast levels and fonts
@@ -58,8 +60,8 @@ Feedback and contact information
If you need information on this website in a different format like accessible PDF, large
print, easy read, audio recording or braille:
- email {{config['CONTACT_EMAIL']}}
- call {{config['CONTACT_PHONE']}}
+ email {{ config['CONTACT_EMAIL'] }}
+ call {{ config['CONTACT_PHONE'] }}
[add any other contact details]
We’ll consider your request and get back to you in [number] days.
@@ -99,7 +101,7 @@ Technical information about this website’s accessi
'text': "Note: this form of wording is legally required, so do not change it."
}) }}
- {{config['DEPARTMENT_NAME']}} is committed to making its website accessible, in accordance with the
+
{{ config['DEPARTMENT_NAME'] }} is committed to making its website accessible, in accordance with the
Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.
Compliance status
@@ -187,7 +189,7 @@ Interactive tools and transactions
website.
We’ve assessed the cost of fixing the issues with navigation and accessing information, and
- with interactive tools and transactions. We believe that doing so now would be a disproportionate burden within
+ with interactive tools and transactions. We believe that doing so now would be a disproportionate burden within
the meaning of the accessibility regulations. We will make another assessment when the supplier contract is up for
renewal, likely to be in [rough timing].
@@ -203,7 +205,7 @@ PDFs and other documents
have PDFs with information on how users can access our services, and forms published as Word documents. By
September 2020, we plan to either fix these or replace them with accessible HTML pages.
- The accessibility regulations do not require us to fix PDFs or other documents published
+ The accessibility regulations do not require us to fix PDFs or other documents published
before 23 September 2018 if they’re not essential to providing our services. For example, we do not plan to fix
[example of non-essential document].
@@ -211,7 +213,7 @@ PDFs and other documents
Live video
- We do not plan to add captions to live video streams because live video is exempt from meeting
+ We do not plan to add captions to live video streams because live video is exempt from meeting
the accessibility regulations .
What we’re doing to improve accessibility
@@ -249,4 +251,4 @@ Preparation of this accessibility statement
}) }}
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/cookies.html b/app/templates/main/cookies.html
index a1f1ce0..efea749 100644
--- a/app/templates/main/cookies.html
+++ b/app/templates/main/cookies.html
@@ -3,7 +3,12 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
{%- from 'govuk_frontend_jinja/components/table/macro.html' import govukTable -%}
-{% block pageTitle %}{%- if form.errors %}Error: {% endif -%}Cookies – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}
+ {%- if form.errors %}
+ Error:
+ {% endif -%}
+ Cookies – {{ config['SERVICE_NAME'] }} – GOV.UK
+{% endblock pageTitle %}
{% block content %}
@@ -12,12 +17,13 @@
Cookies
Cookies are small files saved on your phone, tablet or computer when you visit a website.
-
We use cookies to make {{config['SERVICE_NAME']}} work and collect information about how you use our
+
We use cookies to make {{ config['SERVICE_NAME'] }} work and collect information about how you use our
service.
Essential cookies
-
Essential cookies keep your information secure while you use {{config['SERVICE_NAME']}}. We do not need
+
Essential cookies keep your information secure while you use {{ config['SERVICE_NAME'] }}. We do not need
to ask permission to use them.
+
{{ govukTable(
{
'head': [{'text': 'Name'}, {'text': 'Purpose'}, {'text': 'Expires'}],
@@ -26,11 +32,12 @@
Essential cookies
[{'text': 'session'}, {'text': 'Temporary storage'}, {'text': 'Session'}]
]
}
- )}}
+ ) }}
Functional cookies
Functional cookies allow you to take advantage of some functionality, for example remembering
settings between visits. The service will work without them.
+
{{ govukTable(
{
'head': [{'text': 'Name'}, {'text': 'Purpose'}, {'text': 'Expires'}],
@@ -38,18 +45,19 @@
Functional cookies
[{'text': 'foo'}, {'text': 'bar'}, {'text': 'baz'}]
]
}
- )}}
+ ) }}
Analytics cookies
-
With your permission, we use Google Analytics to collect data about how you use {{config['SERVICE_NAME']}}. This
+
With your permission, we use Google Analytics to collect data about how you use {{ config['SERVICE_NAME'] }}. This
information helps us to improve our service.
Google is not allowed to use or share our analytics data with anyone.
Google Analytics stores anonymised information about:
- how you got to {{config['SERVICE_NAME']}}
- the pages you visit on {{config['SERVICE_NAME']}} and how long you spend on them
- any errors you see while using {{config['SERVICE_NAME']}}
+ how you got to {{ config['SERVICE_NAME'] }}
+ the pages you visit on {{ config['SERVICE_NAME'] }} and how long you spend on them
+ any errors you see while using {{ config['SERVICE_NAME'] }}
+
{{ govukTable(
{
'head': [{'text': 'Name'}, {'text': 'Purpose'}, {'text': 'Expires'}],
@@ -57,7 +65,7 @@
Analytics cookies
[{'text': 'foo'}, {'text': 'bar'}, {'text': 'baz'}]
]
}
- )}}
+ ) }}
Change your cookie settings
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/data-glossary.html b/app/templates/main/data-glossary.html
index 366f8d9..709684c 100644
--- a/app/templates/main/data-glossary.html
+++ b/app/templates/main/data-glossary.html
@@ -18,7 +18,6 @@ Data extract glossary
12/06/2023
-
{{ govukAccordion({
"id": "glossary",
"headingLevel": 3,
@@ -54,7 +53,7 @@ Amount
When additional information is needed to accompany any data.
- This should be the principal administrator of the project, programme or package.
+
This should be the principal administrator of the project, programme or package.
Consequences
As part of the risk register, this information represents the impact of not mitigating the risk.
Current status
@@ -91,7 +90,7 @@ Forecast
Also known as a final business case.
This number will predict the financial future by looking at the historical performance data.
Full description
- A full description of the reason for submitting certain data in a field will be required here.
+
A full description of the reason for submitting certain data in a field will be required here.
Funding source name
This could be funding from a named:
@@ -420,4 +419,4 @@ Unit of measurement
})
}}
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/download.html b/app/templates/main/download.html
index f906ac0..d8f4933 100644
--- a/app/templates/main/download.html
+++ b/app/templates/main/download.html
@@ -11,7 +11,7 @@
{% block beforeContent %}
{{ super() }}
-{% endblock %}
+{% endblock beforeContent %}
{% block content %}
Download monitoring and evaluation data
@@ -84,4 +84,4 @@ Download monitoring and evaluation data
Access the funding glossary
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/help.html b/app/templates/main/help.html
index 18c8224..58dae4e 100644
--- a/app/templates/main/help.html
+++ b/app/templates/main/help.html
@@ -4,13 +4,13 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
{% block head %}
-
+
-
+
{% assets "css" %} {% endassets %}
-{% endblock %}
+{% endblock head %}
{% block content %}
Get help
@@ -18,8 +18,8 @@ Get help
Email
{{ config.CONTACT_EMAIL }}
Monday to Friday: 9am to 5pm (except public holidays).
-{% endblock %}
+{% endblock content %}
{% block footer %}
{{ govukFooter({}) }}
-{% endblock %}
+{% endblock footer %}
diff --git a/app/templates/main/login.html b/app/templates/main/login.html
index 611dae2..09f088a 100644
--- a/app/templates/main/login.html
+++ b/app/templates/main/login.html
@@ -5,13 +5,13 @@
{%- from 'govuk_frontend_jinja/components/footer/macro.html' import govukFooter -%}
{% block head %}
-
+
-
+
{% assets "css" %} {% endassets %}
-{% endblock %}
+{% endblock head %}
{% block header %}
{{ govukHeader({
@@ -19,13 +19,13 @@
'serviceName': '',
'serviceUrl': url_for('main.download'),
}) }}
-{% endblock %}
+{% endblock header %}
{% block beforeContent %}
{% block phaseBanner %}
{{ super() }}
- {% endblock %}
-{% endblock %}
+ {% endblock phaseBanner %}
+{% endblock beforeContent %}
{% block content %}
@@ -34,14 +34,14 @@
Find monitoring data
{{ govukButton({
"text": "Log in",
- "href": config['AUTHENTICATOR_HOST'] + "/sso/login?return_app=post-award-frontend",
+ "href": config['AUTHENTICATOR_HOST'] + "/sso/login?return_app=post-award-frontend",
"classes": "login-button"
}) }}
Get help
If you are having difficulties logging in, email the FSD support team at {{ config.CONTACT_EMAIL }}
-{% endblock %}
+{% endblock content %}
{{ govukFooter({}) }}
@@ -49,4 +49,4 @@ Get help
{% assets "js" %}{% endassets %}
-{% endblock %}
+{% endblock bodyEnd %}
diff --git a/app/templates/main/privacy.html b/app/templates/main/privacy.html
index 896be88..a425599 100644
--- a/app/templates/main/privacy.html
+++ b/app/templates/main/privacy.html
@@ -2,7 +2,9 @@
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
-{% block pageTitle %}Privacy notice – {{config['SERVICE_NAME']}} – GOV.UK{% endblock %}
+{% block pageTitle %}
+ Privacy notice – {{ config['SERVICE_NAME'] }} – GOV.UK
+{% endblock pageTitle %}
{% block content %}
@@ -11,4 +13,4 @@
Privacy notice
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/request-received.html b/app/templates/main/request-received.html
index 1b9ba6b..8ad5f23 100644
--- a/app/templates/main/request-received.html
+++ b/app/templates/main/request-received.html
@@ -28,4 +28,4 @@
-{% endblock %}
+{% endblock content %}
diff --git a/app/templates/main/select.html b/app/templates/main/select.html
index 7215c1b..16cf91e 100644
--- a/app/templates/main/select.html
+++ b/app/templates/main/select.html
@@ -1,61 +1,44 @@
{% macro selectItems(params) %}
-