From 3d6a181cb73924689eb74cd8721496651a5e7792 Mon Sep 17 00:00:00 2001 From: ariannedee Date: Thu, 15 Oct 2020 13:16:10 -0700 Subject: [PATCH] DIV-1019: Add error to page if there are errors in questionnaire --- .../core/templates/dashboard/print_form.html | 16 ++++++++++++++-- edivorce/apps/core/views/main.py | 6 +++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/edivorce/apps/core/templates/dashboard/print_form.html b/edivorce/apps/core/templates/dashboard/print_form.html index 1da3f87d..00e44f4c 100644 --- a/edivorce/apps/core/templates/dashboard/print_form.html +++ b/edivorce/apps/core/templates/dashboard/print_form.html @@ -7,6 +7,16 @@ {% block content %}

Review and Print your Divorce Forms

+ {% if derived.any_errors %} +
+
+
+ At least one question in the Questionnaire portion of this application is incomplete. + Generally, filing incomplete forms will cause your filing to be rejected by the Court Registry. + We recommend you go back to the Questionnaire and complete all pages. +
+
+ {% endif %}

To get divorced, you need to get a divorce order. Only the court has the ability to divorce a married couple. To get a court order you have to @@ -489,8 +499,10 @@ ">Completed Identification of Applicant (VSA 512) for anyone requesting a name change

{% endif %} diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 0c127458..c421d03f 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -199,12 +199,16 @@ def dashboard_nav(request, nav_step): Dashboard: All other pages """ responses_dict = get_data_for_user(request.user) - responses_dict['derived'] = get_derived_data(responses_dict) responses_dict['active_page'] = nav_step template_name = 'dashboard/%s.html' % nav_step if nav_step in ('print_form', 'swear_forms', 'next_steps') and responses_dict.get('court_registry_for_filing'): responses_dict['court_registry_for_filing_address'] = f"123 {responses_dict.get('court_registry_for_filing')} St" responses_dict['court_registry_for_filing_postal_code'] = 'V0A 1A1' + if nav_step in ('print_form',): + responses_dict_by_step = get_step_responses(responses_dict) + responses_dict.update(get_error_dict(responses_dict_by_step)) + + responses_dict['derived'] = get_derived_data(responses_dict) return render(request, template_name=template_name, context=responses_dict)