diff --git a/backend/audit/templates/audit/cross-validation-results.html b/backend/audit/templates/audit/cross-validation-results.html deleted file mode 100644 index b8e0e90b5b..0000000000 --- a/backend/audit/templates/audit/cross-validation-results.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% block content %} -
-
-
- {% csrf_token %} -
- - Pre-submission validation results: - -
- {% if errors.errors %} -

While validating across sheets we encountered the errors below. You must correct these errors in order to proceed to certification.

-

Errors:

-
{{ errors.errors | pprint}}
-

Data submitted:

-
{{ errors.data | pprint}}
-

Audit {{ report_id }} has a submission status of: {{ submission_status }}

- {% else %} - Looks good! - {% endif %} -
-
-
-
-
-{% endblock content %} \ No newline at end of file diff --git a/backend/audit/templates/audit/cross-validation.html b/backend/audit/templates/audit/cross-validation.html deleted file mode 100644 index 9abe0ed73c..0000000000 --- a/backend/audit/templates/audit/cross-validation.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% block content %} -
-
-
- {% csrf_token %} -
- - Pre-submission validation - -

Check your workbooks to confirm you entered your data correctly. This tool also cross-validates the workbooks against each other.

-

If there are errors, you may re-upload the affected workbooks.

- - Cancel -
-
-
-
-{% endblock content %} \ No newline at end of file diff --git a/backend/audit/templates/audit/cross-validation/cross-validation-results.html b/backend/audit/templates/audit/cross-validation/cross-validation-results.html new file mode 100644 index 0000000000..6f6428e4b7 --- /dev/null +++ b/backend/audit/templates/audit/cross-validation/cross-validation-results.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} +{% load static %} +{% block content %} +
+
+
+ {% csrf_token %} +
+ Pre-submission validation +

+ Check your workbooks to confirm you entered your data correctly. This tool also cross-validates the workbooks against each other. +

+

If there are errors, you may re-upload the affected workbooks.

+ {% if errors.errors %} + + + + + + + + + {% for error in errors.errors %}{% endfor %} + + +
Errors
{{ error.error }}
+ {% else %} +

No errors were found.

+ {% endif %} + +
+
+
+
+{% endblock content %} diff --git a/backend/audit/templates/audit/cross-validation/cross-validation.html b/backend/audit/templates/audit/cross-validation/cross-validation.html new file mode 100644 index 0000000000..404c2c1375 --- /dev/null +++ b/backend/audit/templates/audit/cross-validation/cross-validation.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load static %} +{% block content %} +
+
+
+ {% csrf_token %} +
+ Pre-submission validation +

+ Check your workbooks to confirm you entered your data correctly. This tool also cross-validates the workbooks against each other. +

+

If there are errors, you may re-upload the affected workbooks.

+
+ + + Return to checklist +
+
+
+
+
+{% endblock content %} diff --git a/backend/audit/templates/audit/cross-validation/ready-for-certification.html b/backend/audit/templates/audit/cross-validation/ready-for-certification.html new file mode 100644 index 0000000000..b683595ee1 --- /dev/null +++ b/backend/audit/templates/audit/cross-validation/ready-for-certification.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% load static %} +{% block content %} +
+
+
+ {% csrf_token %} +
+ Lock for certification +

The audit validates and is ready for certification.

+

+ In order to certify, your submission must be locked. No further changes will be possible. Click to lock this audit for certification by the designated certifying officials. +

+ + Back +
+
+
+
+{% endblock content %} diff --git a/backend/audit/templates/audit/ready-for-certification.html b/backend/audit/templates/audit/ready-for-certification.html deleted file mode 100644 index 344d6626bc..0000000000 --- a/backend/audit/templates/audit/ready-for-certification.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% block content %} -
-
-
- {% csrf_token %} -
- - Submit for Certification - -

This is some text explaining that clicking the button below will result in the audit being made available to the certifying auditor for certification.

-

This button will run cross-sheet validation on the sheets that come before this step.

-

Audit {{ report_id }} has a submission status of: {{ submission_status }}

-

This action is taken by the AUDITEE

- -
-
-
-
-{% endblock content %} \ No newline at end of file diff --git a/backend/audit/templates/audit/submission_checklist/submission-checklist.html b/backend/audit/templates/audit/submission_checklist/submission-checklist.html index 125a2df23c..400ffd8163 100644 --- a/backend/audit/templates/audit/submission_checklist/submission-checklist.html +++ b/backend/audit/templates/audit/submission_checklist/submission-checklist.html @@ -295,7 +295,7 @@

Pre-submission validation + href="{% url 'audit:CrossValidation' report_id %}">Pre-submission validation

Before submitting your audit, use our validation tool to check your workbooks for errors.

diff --git a/backend/audit/views.py b/backend/audit/views.py index e18bc6e749..4c8e29a447 100644 --- a/backend/audit/views.py +++ b/backend/audit/views.py @@ -273,7 +273,9 @@ def get(self, request, *args, **kwargs): "report_id": report_id, "submission_status": sac.submission_status, } - return render(request, "audit/cross-validation.html", context) + return render( + request, "audit/cross-validation/cross-validation.html", context + ) except SingleAuditChecklist.DoesNotExist: raise PermissionDenied("You do not have access to this audit.") @@ -287,7 +289,9 @@ def post(self, request, *args, **kwargs): context = {"report_id": report_id, "errors": errors} - return render(request, "audit/cross-validation-results.html", context) + return render( + request, "audit/cross-validation/cross-validation-results.html", context + ) except SingleAuditChecklist.DoesNotExist: raise PermissionDenied("You do not have access to this audit.") @@ -304,7 +308,9 @@ def get(self, request, *args, **kwargs): "report_id": report_id, "submission_status": sac.submission_status, } - return render(request, "audit/ready-for-certification.html", context) + return render( + request, "audit/cross-validation/ready-for-certification.html", context + ) except SingleAuditChecklist.DoesNotExist: raise PermissionDenied("You do not have access to this audit.") @@ -321,7 +327,9 @@ def post(self, request, *args, **kwargs): return redirect(reverse("audit:SubmissionProgress", args=[report_id])) context = {"report_id": report_id, "errors": errors} - return render(request, "audit/cross-validation-results.html", context) + return render( + request, "audit/cross-validation/cross-validation-results.html", context + ) except SingleAuditChecklist.DoesNotExist: raise PermissionDenied("You do not have access to this audit.")