diff --git a/.gitignore b/.gitignore
index 06eaa0918..1eeaa2fc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,3 +161,4 @@ ilb_admin.json
/generated_pdfs/
/python_version.txt
/.env.no-docker
+.DS_Store
diff --git a/pii-ner-exclude.txt b/pii-ner-exclude.txt
index a5f150de2..f70a90643 100644
--- a/pii-ner-exclude.txt
+++ b/pii-ner-exclude.txt
@@ -4959,3 +4959,6 @@ COVER_FIREARMS_SEC5_NOT_EU
Spanish CFS Schedule
TemplateCodes
CaseEmail Records
+noreferrer">DIT
+25th September 2024
+web.support.urls
diff --git a/pii-secret-exclude.txt b/pii-secret-exclude.txt
index 48c3840e5..2dff9bbea 100644
--- a/pii-secret-exclude.txt
+++ b/pii-secret-exclude.txt
@@ -36,7 +36,7 @@ data_migration/management/commands/fixtures/
.circleci/config.yml
web/static/web/js/pdf/paged.polyfill.js
web/static/web/docs/DIT-DBT-NameChangeNotification.pdf
-web/templates/web/accessibility_statement.html
+web/templates/web/support/accessibility_statement.html
web/static/web/docs/PrivacyNotice.pdf
web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/cfs_certificate.pdf
web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/cfs_cover_letter.pdf
@@ -55,3 +55,5 @@ web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/oil_long_licence.pdf
web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/oil_paper_licence_only.pdf
web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/sil_long_licence.pdf
web/tests/utils/pdf/test_visual_regression/benchmark_pdfs/sil_paper_licence_only.pdf
+web/templates/web/support/signatures/validate_v1.html
+web/templates/web/support/signatures/validate_v2.html
diff --git a/web/mail/messages.py b/web/mail/messages.py
index 3eed2691c..dab72f81c 100644
--- a/web/mail/messages.py
+++ b/web/mail/messages.py
@@ -156,7 +156,9 @@ def get_context(self) -> dict[str, Any]:
context = super().get_context()
return context | {
"reference": self.application.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ self.get_site_domain()
+ ),
"application_url": get_case_view_url(self.application, self.get_site_domain()),
}
diff --git a/web/mail/url_helpers.py b/web/mail/url_helpers.py
index f12da8390..18f5e8066 100644
--- a/web/mail/url_helpers.py
+++ b/web/mail/url_helpers.py
@@ -2,7 +2,6 @@
from django.http import QueryDict
from django.shortcuts import reverse
-from django.templatetags.static import static
from web.domains.case.types import Authority, DocumentPack, ImpOrExp
from web.models import (
@@ -28,11 +27,8 @@
)
-def get_validate_digital_signatures_url(full_url: bool = False) -> str:
- url = static("web/docs/ValidateDigSigs.pdf")
- if full_url:
- return urljoin(get_importer_site_domain(), url)
- return url
+def get_validate_digital_signatures_url(domain: str) -> str:
+ return urljoin(domain, reverse("support:validate-signature"))
def get_case_view_url(application: ImpOrExp, domain: str) -> str:
diff --git a/web/static/web/css/pages/help-validate-signatures.css b/web/static/web/css/pages/help-validate-signatures.css
new file mode 100644
index 000000000..418ba4bec
--- /dev/null
+++ b/web/static/web/css/pages/help-validate-signatures.css
@@ -0,0 +1,12 @@
+.cert-help {
+ padding: 1em;
+ text-align: center
+}
+
+.cert-help img {
+ max-width: 600px;
+}
+
+.date-icon {
+ padding: 0.2em 0.3em;
+}
diff --git a/web/static/web/docs/ValidateDigSigs.pdf b/web/static/web/docs/ValidateDigSigs.pdf
deleted file mode 100644
index 77954bd39..000000000
Binary files a/web/static/web/docs/ValidateDigSigs.pdf and /dev/null differ
diff --git a/web/static/web/img/validate_signature/v1/figure2_1.png b/web/static/web/img/validate_signature/v1/figure2_1.png
new file mode 100644
index 000000000..a7bedcf7a
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure2_1.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure2_2.png b/web/static/web/img/validate_signature/v1/figure2_2.png
new file mode 100644
index 000000000..12e044353
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure2_2.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_1.png b/web/static/web/img/validate_signature/v1/figure3_1.png
new file mode 100644
index 000000000..df29313c6
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_1.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_2.png b/web/static/web/img/validate_signature/v1/figure3_2.png
new file mode 100644
index 000000000..aa050aa75
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_2.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_3.png b/web/static/web/img/validate_signature/v1/figure3_3.png
new file mode 100644
index 000000000..c96ccfa34
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_3.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_4.png b/web/static/web/img/validate_signature/v1/figure3_4.png
new file mode 100644
index 000000000..e26a25531
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_4.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_5.png b/web/static/web/img/validate_signature/v1/figure3_5.png
new file mode 100644
index 000000000..b37af08b4
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_5.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_6.png b/web/static/web/img/validate_signature/v1/figure3_6.png
new file mode 100644
index 000000000..f978ab2d5
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_6.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_7.png b/web/static/web/img/validate_signature/v1/figure3_7.png
new file mode 100644
index 000000000..88749c294
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_7.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_8.png b/web/static/web/img/validate_signature/v1/figure3_8.png
new file mode 100644
index 000000000..6a7ee2f60
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_8.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure3_9.png b/web/static/web/img/validate_signature/v1/figure3_9.png
new file mode 100644
index 000000000..1a36cd460
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure3_9.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure4_1.png b/web/static/web/img/validate_signature/v1/figure4_1.png
new file mode 100644
index 000000000..c893f2237
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure4_1.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure4_2.png b/web/static/web/img/validate_signature/v1/figure4_2.png
new file mode 100644
index 000000000..317d94376
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure4_2.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure4_3.png b/web/static/web/img/validate_signature/v1/figure4_3.png
new file mode 100644
index 000000000..f973f7dae
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure4_3.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure4_4.png b/web/static/web/img/validate_signature/v1/figure4_4.png
new file mode 100644
index 000000000..00f53f3cb
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure4_4.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure5_1.png b/web/static/web/img/validate_signature/v1/figure5_1.png
new file mode 100644
index 000000000..4989564c3
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure5_1.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure5_2.png b/web/static/web/img/validate_signature/v1/figure5_2.png
new file mode 100644
index 000000000..2984ea5e3
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure5_2.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure5_3.png b/web/static/web/img/validate_signature/v1/figure5_3.png
new file mode 100644
index 000000000..e6cfb50a7
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure5_3.png differ
diff --git a/web/static/web/img/validate_signature/v1/figure5_4.png b/web/static/web/img/validate_signature/v1/figure5_4.png
new file mode 100644
index 000000000..f5f47e3ff
Binary files /dev/null and b/web/static/web/img/validate_signature/v1/figure5_4.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure2_1.png b/web/static/web/img/validate_signature/v2/figure2_1.png
new file mode 100644
index 000000000..091d600b6
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure2_1.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_1.png b/web/static/web/img/validate_signature/v2/figure3_1.png
new file mode 100644
index 000000000..00b2e5d72
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_1.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_2.png b/web/static/web/img/validate_signature/v2/figure3_2.png
new file mode 100644
index 000000000..f4665136f
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_2.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_3.png b/web/static/web/img/validate_signature/v2/figure3_3.png
new file mode 100644
index 000000000..48f2fb65b
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_3.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_4.png b/web/static/web/img/validate_signature/v2/figure3_4.png
new file mode 100644
index 000000000..8682a1060
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_4.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_5.png b/web/static/web/img/validate_signature/v2/figure3_5.png
new file mode 100644
index 000000000..c982e52cf
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_5.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_6.png b/web/static/web/img/validate_signature/v2/figure3_6.png
new file mode 100644
index 000000000..48f2fb65b
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_6.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_7.png b/web/static/web/img/validate_signature/v2/figure3_7.png
new file mode 100644
index 000000000..6f7f2d6aa
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_7.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_8.png b/web/static/web/img/validate_signature/v2/figure3_8.png
new file mode 100644
index 000000000..43fbecd95
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_8.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure3_9.png b/web/static/web/img/validate_signature/v2/figure3_9.png
new file mode 100644
index 000000000..e2cef9567
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure3_9.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure4_1.png b/web/static/web/img/validate_signature/v2/figure4_1.png
new file mode 100644
index 000000000..48f2fb65b
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure4_1.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure4_2.png b/web/static/web/img/validate_signature/v2/figure4_2.png
new file mode 100644
index 000000000..e2eb021e7
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure4_2.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure4_3.png b/web/static/web/img/validate_signature/v2/figure4_3.png
new file mode 100644
index 000000000..d6351af89
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure4_3.png differ
diff --git a/web/static/web/img/validate_signature/v2/figure4_4.png b/web/static/web/img/validate_signature/v2/figure4_4.png
new file mode 100644
index 000000000..722604312
Binary files /dev/null and b/web/static/web/img/validate_signature/v2/figure4_4.png differ
diff --git a/web/support/__init__.py b/web/support/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/web/support/forms.py b/web/support/forms.py
new file mode 100644
index 000000000..309b23b8d
--- /dev/null
+++ b/web/support/forms.py
@@ -0,0 +1,7 @@
+from django import forms
+
+from web.forms.fields import JqueryDateField
+
+
+class ValidateSignatureForm(forms.Form):
+ date_issued = JqueryDateField(required=True, label="What date was your document issued")
diff --git a/web/support/urls.py b/web/support/urls.py
new file mode 100644
index 000000000..5cc7f3944
--- /dev/null
+++ b/web/support/urls.py
@@ -0,0 +1,39 @@
+from django.urls import path
+
+from .views import (
+ AccessibilityStatementView,
+ SupportLandingView,
+ ValidateSignatureV1View,
+ ValidateSignatureV2View,
+ ValidateSignatureView,
+)
+
+app_name = "support"
+
+urlpatterns = [
+ path(
+ "",
+ SupportLandingView.as_view(),
+ name="landing",
+ ),
+ path(
+ "accessibility-statement/",
+ AccessibilityStatementView.as_view(),
+ name="accessibility-statement",
+ ),
+ path(
+ "validate-signature/",
+ ValidateSignatureView.as_view(),
+ name="validate-signature",
+ ),
+ path(
+ "validate-signature/v1/",
+ ValidateSignatureV1View.as_view(),
+ name="validate-signature-v1",
+ ),
+ path(
+ "validate-signature/v2/",
+ ValidateSignatureV2View.as_view(),
+ name="validate-signature-v2",
+ ),
+]
diff --git a/web/support/views.py b/web/support/views.py
new file mode 100644
index 000000000..c531fe6ef
--- /dev/null
+++ b/web/support/views.py
@@ -0,0 +1,39 @@
+import datetime as dt
+
+from django.http import HttpResponse
+from django.shortcuts import redirect
+from django.urls import reverse
+from django.views.generic import FormView, TemplateView
+
+from .forms import ValidateSignatureForm
+
+
+class AccessibilityStatementView(TemplateView):
+ http_method_names = ["get"]
+ template_name = "web/support/accessibility_statement.html"
+
+
+class SupportLandingView(TemplateView):
+ http_method_names = ["get"]
+ template_name = "web/support/index.html"
+
+
+class ValidateSignatureView(FormView):
+ form_class = ValidateSignatureForm
+ template_name = "web/support/signatures/validate.html"
+
+ def form_valid(self, form: ValidateSignatureForm) -> HttpResponse:
+ date_issued = form.cleaned_data["date_issued"]
+ if date_issued >= dt.date(2024, 9, 26):
+ return redirect(reverse("support:validate-signature-v2"))
+ return redirect(reverse("support:validate-signature-v1"))
+
+
+class ValidateSignatureV1View(TemplateView):
+ http_method_names = ["get"]
+ template_name = "web/support/signatures/validate_v1.html"
+
+
+class ValidateSignatureV2View(TemplateView):
+ http_method_names = ["get"]
+ template_name = "web/support/signatures/validate_v2.html"
diff --git a/web/templates/base.html b/web/templates/base.html
index 52891e9f3..14af36762 100644
--- a/web/templates/base.html
+++ b/web/templates/base.html
@@ -102,7 +102,7 @@
{% block footer %}
{% endblock %}
diff --git a/web/templates/layout/public.html b/web/templates/layout/public.html
index 696128b26..495d2951f 100644
--- a/web/templates/layout/public.html
+++ b/web/templates/layout/public.html
@@ -29,7 +29,7 @@
, except where otherwise stated. Fair Processing Notice
Cookies
- Accessibility Statement
+ Accessibility Statement
{% endblock %}
diff --git a/web/templates/web/accessibility_statement.html b/web/templates/web/support/accessibility_statement.html
similarity index 86%
rename from web/templates/web/accessibility_statement.html
rename to web/templates/web/support/accessibility_statement.html
index 9f694f5a6..a3f9dc485 100644
--- a/web/templates/web/accessibility_statement.html
+++ b/web/templates/web/support/accessibility_statement.html
@@ -1,15 +1,13 @@
-{% extends "layout/sidebar.html" %}
+{% extends "web/support/index.html" %}
-{% block context_header %}Apply for an import licence or export certificate accessibility statement{% endblock %}
+{% block context_header %}{{ request.site.name }} accessibility statement{% endblock %}
-{% block page_title %}Apply for an import licence or export certificate accessibility statement{% endblock %}
+{% block page_title %}{{ request.site.name }} accessibility statement{% endblock %}
+
+{% block main_content %}
-{% block content %}
-
-
-
-
This accessibility statement applies to the service Apply for an import licence and export certificate.
+
This accessibility statement applies to the service {{ request.site.name }}.
The Department for Business and Trade (DBT) wants to make the service accessible for all and must do so to comply with rules set out by The Equality and Human Rights Commission (EHRC), responsible for enforcing the Public Sector Bodies Accessibility Regulations 2018.
Users should be able to:
@@ -42,9 +40,7 @@ Preparation of this accessibility statement
This statement was prepared on 4th September 2024. It was last reviewed on 1st July 2024.
This website was last tested on 10th of August 2023. The test was carried out by DAC (Digital Accessibility Centre).
-
-
-
+
{% endblock %}
{% block footer %}{% endblock %}
diff --git a/web/templates/web/support/index.html b/web/templates/web/support/index.html
new file mode 100644
index 000000000..44a8c28e6
--- /dev/null
+++ b/web/templates/web/support/index.html
@@ -0,0 +1,17 @@
+{% extends "layout/sidebar.html" %}
+
+
+{% block context_header %}
+ Help and support
+{% endblock %}
+
+{% block sidebar %}
+ {% include "web/support/partial/sidebar.html" %}
+{% endblock %}
+
+{% block main_content %}
+ Help and support
+ Find important information including our accessibility statement and how to validate digital signatures.
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/web/templates/web/support/partial/sidebar.html b/web/templates/web/support/partial/sidebar.html
new file mode 100644
index 000000000..1833c1162
--- /dev/null
+++ b/web/templates/web/support/partial/sidebar.html
@@ -0,0 +1,19 @@
+
diff --git a/web/templates/web/support/signatures/validate.html b/web/templates/web/support/signatures/validate.html
new file mode 100644
index 000000000..99c2ad37d
--- /dev/null
+++ b/web/templates/web/support/signatures/validate.html
@@ -0,0 +1,28 @@
+{% extends "web/support/index.html" %}
+
+{% block context_header %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block page_title %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block css %}
+ {{ super() }}
+
+{% endblock %}
+
+{% block main_content %}
+
+
+
+
+
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/web/templates/web/support/signatures/validate_v1.html b/web/templates/web/support/signatures/validate_v1.html
new file mode 100644
index 000000000..6a3034a01
--- /dev/null
+++ b/web/templates/web/support/signatures/validate_v1.html
@@ -0,0 +1,133 @@
+{% extends "web/support/index.html" %}
+
+{% block context_header %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block page_title %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block css %}
+ {{ super() }}
+
+{% endblock %}
+
+
+{% block main_content %}
+
+
Use this guide if your documents were issued before 26th September 2024
+
You will be receiving PDF licences and letters through ICMS which will be digitally signed.
+
1. Prerequisite
+
Before opening a licence please ensure that you have the latest version of Adobe Acrobat Reader installed (This can be found at: https://get.adobe.com/uk/reader/ ). Ideally it is also recommended that you view the licences on a Windows system.
+
2. Opening the licence
+
Please ensure that you open the licence in the Adobe Reader and not in the Adobe web browser plugin (which is the default option in most cases). You will need to save the licence to your computer and open the file in Adobe Acrobat Reader DC.
+
+
+
Figure 2.1
+
+
In Figure 2.2 you can see what the options will look like if you are in the Adobe Browser plugin, the normal options are not present when you right click on the signature. Instead you only have print/rotate/save as etc.
+
+
+
Figure 2.2
+
+
3. Validating the Signature
+
The licence you receive will probably have the following image where you would normally expect to see a signature.
+
+
+
Figure 3.1
+
+
In order to validate the signature, you should right click on the signature and select ‘Show Signature Properties’ option (see Figure 3.2).
+
+
+
Figure 3.2
+
+
The following box up will then appear.
+
+
+
Figure 3.3
+
+
Click on the ‘Show Signer’s Certificate’ button. In the next dialogue box (Figure 3.4) select the ‘Trust’ tab. Then make sure the lowest level certificate is selected in the left panel (highlighted in blue below). Then click on the ‘Add to Trusted Certificates…’ button.
+
+
+
Figure 3.4
+
+
You will then be presented with the security box below. Click on the ‘OK’ button.
+
+
+
Figure 3.5
+
+
In the next dialogue box (Figure 3.6) make sure the ‘Use this certificate as a trusted root’ tickbox is checked and then click the ‘OK’ button.
+
+
+
Figure 3.6
+
+
You will be returned to the box shown in Figure 3.7, where you will need to click on the ‘OK’ button.
+
+
+
Figure 3.7
+
+
In the next box (Figure 3.8) click on the ‘Validate Signature’ button. Finally click the ‘Close’ button.
+
+
+
Figure 3.8
+
+
When you look again at your pdf document, you should see the following image where you would normally expect to see a signature:
+
+
+
Figure 3.9
+
+
From that point on, all PDF documents sent by us should show the above image.
+
4. Troubleshooting
+
If upon completing the steps listed in section 3 you find that the signature is still displaying ‘Validity unknown‘. Please return to the dialog box shown in Figure 3.4. If it looks like the box below (Figure 4.1) with the ‘Add to Trusted Certificates’ button disabled, then it is likely that you did not ticket the ‘Use this certificate as a trusted root’ tickbox as shown in Figure 3.6 above.
+
+
+
Figure 4.1
+
+
To solve this you will have to remove the certificate and re-add it. To remove the certificate, go to the Preferences option under the Edit menu.
+
+
+
Figure 4.2
+
+
The box displayed in Figure 4.3 will then appear. Under the Signatures category select the button for ‘Identities & Trusted Certificates’
+
+
+
Figure 4.3
+
+
In the next box (Figure 4.4), select ‘Trusted Certificates’ in the left section and then scroll down to select the name of the certificate that you added in section 3 (e.g. Export Control Organisation <eco.spire@trade.gsi.gov.uk>). Next click on the ‘Remove’ button at the top of the box. Finally click ‘OK’ in the confirmation box that then appears.
+
+
+
Figure 4.4
+
+
You will then be able to go back and follow the instructions listed in section 3 to add the certificate again, remembering to tick the ‘Use this certificate as a trusted root’ tickbox as shown in Figure 3.6.
+
5. MAC Problems
+
There is a known problem with the preview app and digital signatures on a MAC computer. If the user has viewed the PDF with Preview prior to opening it in Adobe Reader they will not be able to validate the signature.
+
When this happens Adobe thinks that the signature is just an image (see Figure 5.1).
+
+
+
Figure 5.1
+
+
To resolve this, try the following:
+
+ Download the PDF again, making sure that if it does get opened in Preview you quit out of it without clicking on any element in the PDF at all - this is what causes Preview to break the signature. Then open the file in Adobe Reader and follow the instructions in section 3 of this document.
+ If that does not work try to get Preview to undo any changes it has made. Force Preview to open the PDF by right clicking and going open with preview
+
+
+
+
Figure 5.2
+
+
Within Preview, under the File menu, go to Revert To => Browse All Versions (See Figure 5.3).
+
+
+
Figure 5.3
+
+
In the version selector click the up arrow to get to the earliest revision of the file - this should be a version identical to the one downloaded. Then click Restore.
+
+
+
Figure 5.4
+
+
Quit Preview and open the PDF with Adobe. The normal validation instructions should then work.
+
Alternatively use a windows PC. There's no equivalent default preview application in Windows that does anything like what MacOS Preview does.
+
The users might like to consider the following guide http://osxdaily.com/2012/08/22/turn-off-auto-save-os-x/ to disable auto-save in MacOS.
+
6. New Digital Certificates
+
Digital certificates are periodically replaced (normally every few years). When this happens, you would need to repeat the steps listed in section 3 to make the new certificate trusted.
+
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/web/templates/web/support/signatures/validate_v2.html b/web/templates/web/support/signatures/validate_v2.html
new file mode 100644
index 000000000..13089ca82
--- /dev/null
+++ b/web/templates/web/support/signatures/validate_v2.html
@@ -0,0 +1,101 @@
+{% extends "web/support/index.html" %}
+{% block context_header %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block page_title %}How to validate a signature on a digitally signed document{% endblock %}
+
+{% block css %}
+ {{ super() }}
+
+{% endblock %}
+
+
+{% block main_content %}
+
+
+
Use this guide if your documents were issued after 25th September 2024
+
You will be receiving PDF licences and letters through "Apply for an import licence or export certificate" which will be digitally signed.
+
1. Prerequisite
+
Before opening a licence please ensure that you have the latest version of Adobe Acrobat Reader installed (This can be found at: https://get.adobe.com/uk/reader/ ).
+
2. Opening the licence
+
Please ensure that you open the licence in the Adobe Reader and not in the Adobe web browser plugin (which is the default option in most cases). You will need to save the licence to your computer and open the file in Adobe Acrobat Reader.
+
+
+
Figure 2.1
+
+
3. Validating the Signature
+
When opening the licence you will probably see the following message at the top of the document.
+
+
+
Figure 3.1
+
+
In order to validate the signature, click ‘Signature Panel’, expand ‘Signature Details` and then click ‘Certificate Details..’ (see Figure 3.2).
+
+
+
Figure 3.2
+
+
In the next dialogue box (Figure 3.3) select the ‘Trust’ tab. Then make sure the lowest level certificate is selected in the left panel (highlighted in blue below). Then click on the ‘Add to Trusted Certificates…’ button.
+
+
+
Figure 3.3
+
+
You will then be presented with the security box below. Click on the ‘OK’ button.
+
+
+
Figure 3.4
+
+
In the next dialogue box (Figure 3.5) make sure the ‘Use this certificate as a trusted root’ checkbox is ticked and then click the ‘OK’ button.
+
+
+
Figure 3.5
+
+
You will be returned to the box shown in Figure 3.6, where you will need to click on the ‘OK’ button.
+
+
+
Figure 3.6
+
+
Then back in the Signature Panel (Figure 3.7) click the three dots in the top right corner. Then click `Validate All Signatures`.
+
+
+
Figure 3.7
+
+
You will then be presented with the security box below (Figure 3.8). Click on the ‘OK’ button.
+
+
+
Figure 3.8
+
+
When you look again at your PDF document, you should see the top banner has changed and now says ‘Signed and all signatures are valid’
+
+
+
Figure 3.9
+
+
From that point on, all PDF documents sent by us should show the above image.
+
4. Troubleshooting
+
If upon completing the all listed steps you find that the signature is still displaying ‘At least one signature has problems’. Please start section 3 again making sure that the ‘Use this certificate as a trusted root’ checkbox in Figure 3.6 is ticked.
+
If the ‘Add to trusted certificates..’ button in Figure 3.4 is greyed out like in Figure 4.1 and you are unable to click it, then it is likely that the ‘Use certificate as trusted root’ checkbox (Figure 3.6) was unticked.
+
+
+
Figure 4.1
+
+
To solve this you will have to remove the certificate and re-add it. To remove the certificate, go to the Preferences option either under the Edit menu or on a Mac by clicking on the menu below ‘Acrobat Reader’.
+
+
+
Figure 4.2
+
+
The box displayed in Figure 4.3 will then appear. Under the Signatures category select the button for ‘Identities & Trusted Certificates’
+
+
+
Figure 4.3
+
+
In the next box (Figure 4.4), select ‘Trusted Certificates’ in the left section and then scroll down to select the name of the certificate that you added in section 3 (e.g. DBT). Next click on the ‘Remove’ button at the top of the box. Finally click ‘OK’ in the confirmation box that then appears.
+
+
+
Figure 4.4
+
+
You will then be able to go back and follow the instructions listed in section 3 to add the certificate again, remembering to tick the ‘Use this certificate as a trusted root’ checkbox as shown in Figure 3.5.
+
5. New Digital Certificates
+
Digital certificates are periodically replaced (normally every few years). When this happens, you would need to repeat the steps listed in section 3 to make the new certificate trusted.
+
+
+{% endblock %}
+
+{% block footer %}{% endblock %}
diff --git a/web/tests/domains/case/_import/fa_oil/test_views.py b/web/tests/domains/case/_import/fa_oil/test_views.py
index e515ae04d..b9682b78a 100644
--- a/web/tests/domains/case/_import/fa_oil/test_views.py
+++ b/web/tests/domains/case/_import/fa_oil/test_views.py
@@ -147,7 +147,9 @@ def test_close_case(ilb_admin_user, ilb_admin_client, importer, importer_one_con
EmailTypes.APPLICATION_STOPPED,
{
"reference": process.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(process, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
diff --git a/web/tests/domains/case/_import/sanctions/test_views.py b/web/tests/domains/case/_import/sanctions/test_views.py
index 3c39aa0d3..8191ac154 100644
--- a/web/tests/domains/case/_import/sanctions/test_views.py
+++ b/web/tests/domains/case/_import/sanctions/test_views.py
@@ -500,7 +500,7 @@ def test_submit_sanctions_closes_open_update_request(
{
"reference": self.app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_caseworker_site_domain()
),
"application_url": get_case_manage_view_url(self.app),
"icms_url": get_caseworker_site_domain(),
diff --git a/web/tests/domains/case/views/test_views_fir.py b/web/tests/domains/case/views/test_views_fir.py
index 6f525be23..1ed315772 100644
--- a/web/tests/domains/case/views/test_views_fir.py
+++ b/web/tests/domains/case/views/test_views_fir.py
@@ -313,6 +313,9 @@ def assert_response_email_sent(self):
"icms_url": get_caseworker_site_domain(),
"service_name": SiteName.CASEWORKER.label,
"application_url": get_case_view_url(self.process, get_caseworker_site_domain()),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
},
exp_subject="test responded email",
exp_in_body="test request detail",
@@ -334,7 +337,9 @@ def expected_email_personalisation(self):
"icms_url": self.expected_site,
"service_name": self.expected_service_name,
"fir_type": self.fir_type,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ self.expected_site
+ ),
"application_url": get_case_view_url(self.process, self.expected_site),
}
diff --git a/web/tests/domains/case/views/test_views_misc.py b/web/tests/domains/case/views/test_views_misc.py
index 6993fced6..338d8e693 100644
--- a/web/tests/domains/case/views/test_views_misc.py
+++ b/web/tests/domains/case/views/test_views_misc.py
@@ -518,7 +518,9 @@ def test_start_authorisation_rejected_variation_requested_application(
EmailTypes.APPLICATION_VARIATION_REQUEST_REFUSED,
{
"reference": wood_application.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(wood_application, get_importer_site_domain()),
"reason": "test refuse reason",
"icms_url": get_importer_site_domain(),
diff --git a/web/tests/domains/case/views/test_views_search.py b/web/tests/domains/case/views/test_views_search.py
index 2b3ac6866..1690b0c0c 100644
--- a/web/tests/domains/case/views/test_views_search.py
+++ b/web/tests/domains/case/views/test_views_search.py
@@ -348,7 +348,7 @@ def _check_email_is_sent(self, application):
{
"reference": application.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(application, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
@@ -449,7 +449,7 @@ def _check_email_is_sent(self, application):
{
"reference": application.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_exporter_site_domain()
),
"application_url": get_case_view_url(application, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
@@ -706,7 +706,7 @@ def test_revoke_certificate_with_send_email(self, completed_cfs_app):
{
"reference": app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_exporter_site_domain()
),
"application_url": get_case_view_url(app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
@@ -747,7 +747,7 @@ def test_revoke_licence_with_send_email(self):
{
"reference": self.app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.app, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
diff --git a/web/tests/domains/case/views/test_views_update_request.py b/web/tests/domains/case/views/test_views_update_request.py
index b9caa34c2..75b02808a 100644
--- a/web/tests/domains/case/views/test_views_update_request.py
+++ b/web/tests/domains/case/views/test_views_update_request.py
@@ -70,7 +70,9 @@ def test_manage_update_requests(ilb_admin_client: Client, wood_app_submitted: Im
EmailTypes.APPLICATION_UPDATE,
{
"reference": wood_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(wood_app_submitted, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
@@ -193,7 +195,9 @@ def test_close_update_request_when_ilb_withdraws(
EmailTypes.APPLICATION_UPDATE_WITHDRAWN,
{
"reference": wood_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(wood_app_submitted, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
diff --git a/web/tests/domains/case/views/test_views_variation_request.py b/web/tests/domains/case/views/test_views_variation_request.py
index c64bb0664..f5808f7a8 100644
--- a/web/tests/domains/case/views/test_views_variation_request.py
+++ b/web/tests/domains/case/views/test_views_variation_request.py
@@ -153,7 +153,7 @@ def test_cancel_variation_request_post(self, ilb_admin_user):
{
"reference": self.wood_app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.wood_app, get_importer_site_domain()),
"reason": "Test cancellation reason",
@@ -216,7 +216,7 @@ def test_cancel_variation_request_post(self, ilb_admin_user):
{
"reference": self.app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_caseworker_site_domain()
),
"application_url": get_case_view_url(self.app, get_caseworker_site_domain()),
"reason": None,
@@ -269,7 +269,7 @@ def test_request_update_post(self):
{
"reference": self.wood_app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.wood_app, get_importer_site_domain()),
"reason": "Dummy update request reason",
@@ -309,7 +309,7 @@ def set_app(self, set_client, wood_app_submitted, importer_one_contact):
{
"reference": self.app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.app, get_importer_site_domain()),
"reason": "Dummy update request reason",
@@ -354,7 +354,7 @@ def test_post_successful(self):
{
"reference": self.app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.app, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
@@ -394,7 +394,7 @@ def set_app(self, set_client, wood_app_submitted, importer_one_contact):
{
"reference": self.wood_app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_importer_site_domain()
),
"application_url": get_case_view_url(self.wood_app, get_importer_site_domain()),
"reason": "Dummy update request reason",
@@ -446,7 +446,7 @@ def test_respond_to_update_request_post(self):
{
"reference": self.wood_app.reference,
"validate_digital_signatures_url": get_validate_digital_signatures_url(
- full_url=True
+ get_caseworker_site_domain()
),
"application_url": get_case_view_url(self.wood_app, get_caseworker_site_domain()),
"icms_url": get_caseworker_site_domain(),
diff --git a/web/tests/mail/test_emails.py b/web/tests/mail/test_emails.py
index 26440579f..cccba0de0 100644
--- a/web/tests/mail/test_emails.py
+++ b/web/tests/mail/test_emails.py
@@ -225,7 +225,9 @@ def test_send_application_stopped_email(self, completed_cfs_app, exporter_two):
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_STOPPED)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -243,7 +245,9 @@ def test_send_application_reopened_email(self, completed_cfs_app, exporter_secon
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_REOPENED)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -263,7 +267,9 @@ def test_send_application_reopened_email_inactive_contact(
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_REOPENED)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -296,7 +302,9 @@ def test_send_application_reassigned_email(
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_REASSIGNED)
expected_personalisation = default_personalisation() | {
"reference": com_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"application_url": get_case_view_url(com_app_submitted, get_caseworker_site_domain()),
"comment": expected_comment,
"icms_url": get_caseworker_site_domain(),
@@ -318,7 +326,9 @@ def test_send_application_refused_email(self, fa_sil_app_submitted):
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_REFUSED)
expected_personalisation = default_personalisation() | {
"reference": fa_sil_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(fa_sil_app_submitted, get_importer_site_domain()),
"reason": fa_sil_app_submitted.refuse_reason,
"icms_url": get_importer_site_domain(),
@@ -336,7 +346,9 @@ def test_send_application_complete_email(self, completed_cfs_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_COMPLETE)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -355,7 +367,9 @@ def test_send_application_variation_complete_email(self, completed_cfs_app):
)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -372,7 +386,9 @@ def test_send_application_extension_complete_email(self, completed_cfs_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_EXTENSION_COMPLETE)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -515,7 +531,9 @@ def test_send_variation_request_cancelled_email(self, completed_cfs_app):
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
"reason": "Cancel reason",
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"icms_url": get_caseworker_site_domain(),
"service_name": SiteName.CASEWORKER.label,
"application_url": get_case_view_url(completed_cfs_app, get_caseworker_site_domain()),
@@ -545,7 +563,9 @@ def test_send_variation_request_update_required_email(self, completed_cfs_app):
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
"reason": "Please update",
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
@@ -572,7 +592,9 @@ def test_send_variation_request_update_cancelled_email(self, completed_cfs_app):
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
@@ -599,7 +621,9 @@ def test_send_variation_request_update_received_email(self, completed_cfs_app):
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"icms_url": get_caseworker_site_domain(),
"service_name": SiteName.CASEWORKER.label,
"application_url": get_case_view_url(completed_cfs_app, get_caseworker_site_domain()),
@@ -629,7 +653,9 @@ def test_send_variation_request_refused_email(self, completed_dfl_app):
expected_personalisation = default_personalisation() | {
"reference": completed_dfl_app.reference,
"reason": "Variation refused.",
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(completed_dfl_app, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
@@ -648,7 +674,9 @@ def test_send_firearms_supplementary_report_email(self, completed_dfl_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.FIREARMS_SUPPLEMENTARY_REPORT)
expected_personalisation = default_personalisation() | {
"reference": completed_dfl_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(completed_dfl_app, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
@@ -711,7 +739,9 @@ def test_send_application_further_information_request_email(self, com_app_submit
"fir_url": get_respond_to_application_fir_url(com_app_submitted, fir),
"service_name": SiteName.EXPORTER.label,
"reference": com_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(com_app_submitted, get_exporter_site_domain()),
}
emails.send_further_information_request_email(fir)
@@ -770,7 +800,9 @@ def test_send_application_further_information_request_withdrawn_email(self, com_
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
"reference": com_app_submitted.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(com_app_submitted, get_exporter_site_domain()),
}
emails.send_further_information_request_withdrawn_email(fir)
@@ -831,7 +863,9 @@ def test_send_application_further_information_request_response_email(self, com_a
"service_name": SiteName.CASEWORKER.label,
"reference": com_app_submitted.reference,
"fir_url": get_manage_application_fir_url(com_app_submitted),
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"application_url": get_case_view_url(com_app_submitted, get_caseworker_site_domain()),
}
emails.send_further_information_request_responded_email(fir)
@@ -941,7 +975,9 @@ def test_send_licence_revoked_email(self, completed_dfl_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.LICENCE_REVOKED)
expected_personalisation = default_personalisation() | {
"reference": completed_dfl_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(completed_dfl_app, get_importer_site_domain()),
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
@@ -962,7 +998,9 @@ def test_send_certificate_revoked_email(self, completed_cfs_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.CERTIFICATE_REVOKED)
expected_personalisation = default_personalisation() | {
"reference": completed_cfs_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_exporter_site_domain()
+ ),
"application_url": get_case_view_url(completed_cfs_app, get_exporter_site_domain()),
"icms_url": get_exporter_site_domain(),
"service_name": SiteName.EXPORTER.label,
@@ -980,7 +1018,9 @@ def test_application_update_response_email(self, completed_dfl_app):
exp_template_id = get_gov_notify_template_id(EmailTypes.APPLICATION_UPDATE_RESPONSE)
expected_personalisation = default_personalisation() | {
"reference": completed_dfl_app.reference,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"application_url": get_case_manage_view_url(completed_dfl_app),
"icms_url": get_caseworker_site_domain(),
"service_name": SiteName.CASEWORKER.label,
@@ -1005,7 +1045,9 @@ def test_send_application_update_email(self, wood_app_submitted):
"reference": wood_app_submitted.reference,
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(wood_app_submitted, get_importer_site_domain()),
"application_update_url": get_update_request_view_url(
wood_app_submitted, update_request, get_importer_site_domain()
@@ -1029,7 +1071,9 @@ def test_send_application_update_withdrawn_email(self, wood_app_submitted):
"reference": wood_app_submitted.reference,
"icms_url": get_importer_site_domain(),
"service_name": SiteName.IMPORTER.label,
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_importer_site_domain()
+ ),
"application_url": get_case_view_url(wood_app_submitted, get_importer_site_domain()),
}
emails.send_application_update_withdrawn_email(update_request)
@@ -1297,7 +1341,9 @@ def test_send_constabulary_deactivated_firearms_email(
"service_name": SiteName.CASEWORKER.label,
"reference": completed_dfl_app.reference,
"application_url": get_case_view_url(completed_dfl_app, get_caseworker_site_domain()),
- "validate_digital_signatures_url": get_validate_digital_signatures_url(full_url=True),
+ "validate_digital_signatures_url": get_validate_digital_signatures_url(
+ get_caseworker_site_domain()
+ ),
"check_code": str(link.check_code),
"documents_url": get_dfl_application_otd_url(link),
"constabulary_name": "Derbyshire",
diff --git a/web/tests/mail/test_url_helpers.py b/web/tests/mail/test_url_helpers.py
index 382608aa1..efac63135 100644
--- a/web/tests/mail/test_url_helpers.py
+++ b/web/tests/mail/test_url_helpers.py
@@ -14,15 +14,11 @@
from web.sites import get_exporter_site_domain, get_importer_site_domain
-@pytest.mark.parametrize(
- "full_url,expected_url",
- [
- (False, "/static/web/docs/ValidateDigSigs.pdf"),
- (True, "http://import-a-licence/static/web/docs/ValidateDigSigs.pdf"),
- ],
-)
-def test_get_validate_digital_signatures_url(db, full_url, expected_url):
- assert get_validate_digital_signatures_url(full_url=full_url) == expected_url
+def test_get_validate_digital_signatures_url(db):
+ assert (
+ get_validate_digital_signatures_url(get_importer_site_domain())
+ == "http://import-a-licence/support/validate-signature/"
+ )
def test_get_export_case_view_url(completed_cfs_app):
diff --git a/web/tests/support/__init__.py b/web/tests/support/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/web/tests/support/test_views.py b/web/tests/support/test_views.py
new file mode 100644
index 000000000..acc7ba605
--- /dev/null
+++ b/web/tests/support/test_views.py
@@ -0,0 +1,105 @@
+from http import HTTPStatus
+
+import pytest
+from django.shortcuts import reverse
+
+from web.sites import SiteName
+
+
+def test_accessibility_statement(importer_client, exporter_client, ilb_admin_client, imp_client):
+ url = reverse("support:accessibility-statement")
+ exp_str = "This accessibility statement applies to the service %s"
+
+ response = imp_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str % SiteName.IMPORTER.label in response.content.decode()
+
+ response = importer_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str % SiteName.IMPORTER.label in response.content.decode()
+
+ response = exporter_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str % SiteName.EXPORTER.label in response.content.decode()
+
+ response = ilb_admin_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str % SiteName.CASEWORKER.label in response.content.decode()
+
+
+def test_support_landing_page(importer_client, exporter_client, ilb_admin_client, imp_client):
+ url = reverse("support:landing")
+ exp_str = "Help and support"
+
+ response = imp_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = importer_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = exporter_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = ilb_admin_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+
+@pytest.mark.parametrize(
+ "view_name,exp_str",
+ (
+ ("support:validate-signature", "What date was your document issued"),
+ (
+ "support:validate-signature-v1",
+ "Use this guide if your documents were issued before 26th September 2024",
+ ),
+ (
+ "support:validate-signature-v2",
+ "Use this guide if your documents were issued after 25th September 2024",
+ ),
+ ),
+)
+def test_validate_signature_pages(
+ importer_client, exporter_client, ilb_admin_client, imp_client, view_name, exp_str
+):
+ url = reverse(view_name)
+
+ response = imp_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = importer_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = exporter_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+ response = ilb_admin_client.get(url)
+ assert response.status_code == HTTPStatus.OK
+ assert exp_str in response.content.decode()
+
+
+@pytest.mark.parametrize(
+ "date_issued,exp_view_name",
+ (
+ ("08-Aug-2024", "support:validate-signature-v1"),
+ ("30-Sep-2024", "support:validate-signature-v2"),
+ ),
+)
+def test_validate_signature_page_form(importer_client, date_issued, exp_view_name):
+ url = reverse("support:validate-signature")
+ response = importer_client.post(url, data={"date_issued": date_issued})
+ assert response.status_code == HTTPStatus.FOUND
+ assert response.url == reverse(exp_view_name)
+
+
+def test_validate_signature_page_form_error(importer_client):
+ url = reverse("support:validate-signature")
+ response = importer_client.post(url, data={"date_issued": "hello"})
+ assert response.status_code == HTTPStatus.OK
+ assert response.context["form"].errors == {"date_issued": ["Enter a valid date."]}
diff --git a/web/urls.py b/web/urls.py
index 42dd9a1da..d013a3624 100644
--- a/web/urls.py
+++ b/web/urls.py
@@ -5,7 +5,6 @@
from web.domains.checker.views import V1ToV2RedirectCheckCertificateView
from web.registration.views import LegacyAccountRecoveryView
from web.views import (
- AccessibilityStatementView,
LoginRequiredSelect2AutoResponseView,
RedirectBaseDomainView,
V1ToV2ServiceRenameView,
@@ -81,11 +80,7 @@
),
# Cookie consent URLs
path("cookie-consent/", cookie_consent_view, name="cookie-consent"),
- path(
- "accessibility-statement/",
- AccessibilityStatementView.as_view(),
- name="accessibility-statement",
- ),
+ path("support/", include("web.support.urls")),
# V1->V2 certificate checker
path(
"icms/fox/icms/IMP_CERT_CERTIFICATE_CHECKER/check/",
diff --git a/web/views/__init__.py b/web/views/__init__.py
index d97aa4861..8ca24a95b 100644
--- a/web/views/__init__.py
+++ b/web/views/__init__.py
@@ -1,5 +1,4 @@
from .views import (
- AccessibilityStatementView,
LoginRequiredSelect2AutoResponseView,
ModelCreateView,
ModelDetailView,
@@ -16,7 +15,6 @@
from .views_healthcheck import health_check
__all__ = [
- "AccessibilityStatementView",
"LoginRequiredSelect2AutoResponseView",
"ModelCreateView",
"ModelDetailView",
diff --git a/web/views/views.py b/web/views/views.py
index 7a0f4a590..ff44458e0 100644
--- a/web/views/views.py
+++ b/web/views/views.py
@@ -430,11 +430,6 @@ def get_page_title(self):
return f"Viewing {self.object}"
-class AccessibilityStatementView(TemplateView):
- http_method_names = ["get"]
- template_name = "web/accessibility_statement.html"
-
-
class V1ToV2ServiceRenameView(TemplateView):
"""View detailing service name change for users who have bookmarked the V1 URL."""