diff --git a/edivorce/apps/core/static/js/signing-filing.js b/edivorce/apps/core/static/js/signing-filing.js index 307e3531..0457e5f7 100644 --- a/edivorce/apps/core/static/js/signing-filing.js +++ b/edivorce/apps/core/static/js/signing-filing.js @@ -1,6 +1,9 @@ $(window).load(function () { function setSignSeparatelyDefaults() { + // Set sign together default so if the user chooses it, it is reset $("#sign-in-person-both").prop('checked', true).trigger('change'); + + // If sign separately locations are not set, set the defaults (first page load) if ($("input:radio[name='signing_location_you']:checked").length === 0) { $("#sign-in-person-you").prop('checked', true).trigger('change'); } @@ -10,8 +13,11 @@ $(window).load(function () { } function setSignTogetherDefaults() { + // Set sign separately defaults so if the user chooses it, they are reset $("#sign-in-person-you").prop('checked', true).trigger('change'); $("#sign-in-person-spouse").prop('checked', true).trigger('change'); + + // If sign together location is not set, set the default (first page load) if ($("input:radio[name='signing_location']:checked").length === 0) { $("#sign-in-person-both").prop('checked', true).trigger('change'); } @@ -91,12 +97,19 @@ $(window).load(function () { $("#sign-together").prop('checked', true).trigger('change'); } - // If filing options are not visible, default to In-person + // If filing options are not visible, default to filing In-person if ($("input:radio[name='how_to_file']").length === 0) { ajaxCall('how_to_file', 'In-person'); } else if ($("input:radio[name='how_to_file']:checked").length === 0) { $("#file-online").prop('checked', true).trigger('change'); } + + // If virtual swearing is not available, default to swearing In-person + if ($("#signing-location").length === 0) { + ajaxCall('signing_location', 'In-person'); + ajaxCall('signing_location_you', 'In-person'); + ajaxCall('signing_location_spouse', 'In-person'); + } } // Set signing and filing defaults if the signing option is on the page diff --git a/edivorce/apps/core/templates/dashboard/final_filing.html b/edivorce/apps/core/templates/dashboard/final_filing.html index cb99f267..c3887e23 100644 --- a/edivorce/apps/core/templates/dashboard/final_filing.html +++ b/edivorce/apps/core/templates/dashboard/final_filing.html @@ -94,6 +94,7 @@
The following forms will be automatically filed for you: @@ -259,7 +260,9 @@
+ You must select how you want to file in the Signing & Filing Options step. +
{% endif %} {% endif %} {% if final_filing_submitted != 'True' and how_to_file == 'Online' %} diff --git a/edivorce/apps/core/templates/dashboard/sign_file_options.html b/edivorce/apps/core/templates/dashboard/sign_file_options.html index 0768f737..73000073 100644 --- a/edivorce/apps/core/templates/dashboard/sign_file_options.html +++ b/edivorce/apps/core/templates/dashboard/sign_file_options.html @@ -8,160 +8,178 @@ {% block container_col %}signing-filing{% endblock %} {% block content %} -- To complete your application for divorce, you must - {% include "partials/tooltips/swear_affirm.html" with text="swear/affirm and sign" %} - your {% include "partials/tooltips/affidavit.html" %}. The affidavit(s) must be sworn/affirmed and - signed by both you and your spouse. You have a choice on how you will both swear/affirm and sign. -
-You must both go together to the registry or to a commissioner for taking affidavits to swear/affirm and sign the affidavit(s). This option - costs less (less filing fees) and is typically faster and easier for both of you.
-There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}. You must do it:
-OR
-You can each swear/affirm and sign your own version of the affidavit (you can go separately to the registry or a commissioner for taking - affidavits to swear/affirm and sign the affidavit(s)).
-There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}. You must:
-OR
-You can file (?) your application for divorce in different ways.
-{% endif %} -To file (?) your documents, you will need:
- -+ To complete your application for divorce, you must + {% include "partials/tooltips/swear_affirm.html" with text="swear/affirm and sign" %} + your {% include "partials/tooltips/affidavit.html" %}. The affidavit(s) must be sworn/affirmed and + signed by both you and your spouse. You have a choice on how you will both swear/affirm and sign. +
To file online you will also need:
+You must both go together to the registry or to a commissioner for taking affidavits to swear/affirm and sign the affidavit(s). + This option costs less (less filing fees) and is typically faster and easier for both of you.
+There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}. + You must do it:
OR
+To file in-person you need only the items list above under Filing Options.
+You can each swear/affirm and sign your own version of the affidavit (you can go separately to the registry or a commissioner for + taking affidavits to swear/affirm and sign the affidavit(s)).
+There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}. + You must:
+OR
+Based on your previous selections, you must file In-person.
-To file in-person you need only the items listed under Filing Options.
-An e-mail address is required to setup a {% include "partials/tooltips/virtual_session.html" %}. What is the best e-mail address to contact you at in order to setup the virtual - session?
- - -To file in-person, you and your spouse must sign your affidavit(s) with the court registry, a lawyer, notary or other {% include "partials/tooltips/commissioner.html" %} for - taking affidavits.
-You can file (?) your application for divorce in different ways.
+ {% endif %} +To file (?) your documents, you will need:
- + {% if where_were_you_married_country == 'Canada' %} +To file online you will also need:
+To file in-person you need only the items list above under Filing Options.
+Based on your previous selections, you must file In-person.
+To file in-person you need only the items listed under Filing Options.
++ An e-mail address is required to setup a {% include "partials/tooltips/virtual_session.html" %}. What is the best e-mail address to + contact you at in order to setup the virtual session? +
+ + ++ To file in-person, you and your spouse must sign your affidavit(s) with the court registry, a lawyer, notary or + other {% include "partials/tooltips/commissioner.html" %} for taking affidavits. +
+Ultimately you need to file (submit) your divorce with the Court Registry. - Assuming everything goes well, your divorce will be reviewed by the - Court Registry and passed along to a judge for approval.
+ Assuming everything goes well, your divorce will be reviewed by the + Court Registry and passed along to a judge for approval.This tool will create a number of the key forms required for filing automatically. - A few of these forms will need to be signed by you. - At least one affidavit will require signing / swearing in front of a commissioner - before being filed. There are also additional forms that are not generated by this tool - that you'll need to complete. + A few of these forms will need to be signed by you. + At least one affidavit will require signing / swearing in front of a commissioner + before being filed. There are also additional forms that are not generated by this tool + that you'll need to complete.
The remaining steps in this tool will walk you through the different forms you'll need - and what to do with each of them. - These steps will differ based on how you select to sign and file your documentation on this page.
+ and what to do with each of them. + These steps will differ based on how you select to sign and file your documentation on this page.Once you've got your paperwork together, completed, signed and sworn, you can file it with - the Court Registry.
+ the Court Registry. {% endblock %} \ No newline at end of file diff --git a/edivorce/apps/core/tests/test_filing_documents.py b/edivorce/apps/core/tests/test_filing_documents.py index 89c8f7e8..fd50a2de 100644 --- a/edivorce/apps/core/tests/test_filing_documents.py +++ b/edivorce/apps/core/tests/test_filing_documents.py @@ -231,6 +231,39 @@ class FilingLogic(TestCase): self.assertIn({'doc_type': doc_type("child support affidavit"), 'party_code': 1}, uploaded) self.assertIn({'doc_type': doc_type("child support affidavit"), 'party_code': 2}, uploaded) + def test_final_forms_to_file_you_virtual_spouse_in_person(self): + self.create_response('how_to_sign', 'Separately') + self.create_response('signing_location_you', 'Virtual') + self.create_response('signing_location_spouse', 'In-person') + + # No conditional forms + self.create_response('children_of_marriage', 'NO') + uploaded, generated = forms_to_file(self.questions_dict, initial=False) + + self.assertEqual(len(uploaded), 2) + self.assertIn({'doc_type': doc_type("desk order divorce form"), 'party_code': 1}, uploaded) + self.assertIn({'doc_type': doc_type("desk order divorce form"), 'party_code': 2}, uploaded) + + self.assertEqual(len(generated), 0) + + # Conditional forms + self.create_response('children_of_marriage', 'YES') + self.create_response('has_children_under_19', 'YES') + uploaded, generated = forms_to_file(self.questions_dict, initial=False) + self.assertEqual(len(uploaded), 4) + self.assertIn({'doc_type': doc_type("child support affidavit"), 'party_code': 1}, uploaded) + self.assertIn({'doc_type': doc_type("child support affidavit"), 'party_code': 2}, uploaded) + + self.create_response('want_which_orders', '["Other orders"]') + self.create_response('name_change_you', 'YES') + uploaded, generated = forms_to_file(self.questions_dict, initial=False) + self.assertEqual(len(uploaded), 4) + + self.create_response('name_change_spouse', 'YES') + uploaded, generated = forms_to_file(self.questions_dict, initial=False) + self.assertEqual(len(uploaded), 5) + self.assertIn({'doc_type': doc_type("identification of applicant"), 'party_code': 2}, uploaded) + def test_final_forms_to_file_in_person(self): self.create_response('how_to_sign', 'Together') self.create_response('signing_location', 'In-person') diff --git a/edivorce/apps/core/utils/efiling_documents.py b/edivorce/apps/core/utils/efiling_documents.py index 42ae996e..b99865e3 100644 --- a/edivorce/apps/core/utils/efiling_documents.py +++ b/edivorce/apps/core/utils/efiling_documents.py @@ -1,3 +1,5 @@ +from django.conf import settings + from edivorce.apps.core.utils.derived import get_derived_data @@ -7,9 +9,14 @@ def forms_to_file(responses_dict, initial=False): how_to_file = responses_dict.get('how_to_file') how_to_sign = responses_dict.get('how_to_sign') - signing_location_both = responses_dict.get('signing_location') if how_to_sign == 'Together' else None - signing_location_you = responses_dict.get('signing_location_you') if how_to_sign == 'Separately' else None - signing_location_spouse = responses_dict.get('signing_location_spouse') if how_to_sign == 'Separately' else None + if settings.VIRTUAL_SWEARING_ENABLED: + signing_location_both = responses_dict.get('signing_location') if how_to_sign == 'Together' else None + signing_location_you = responses_dict.get('signing_location_you') if how_to_sign == 'Separately' else None + signing_location_spouse = responses_dict.get('signing_location_spouse') if how_to_sign == 'Separately' else None + else: + signing_location_both = 'In-person' if how_to_sign == 'Together' else None + signing_location_you = 'In-person' if how_to_sign == 'Separately' else None + signing_location_spouse = 'In-person' if how_to_sign == 'Separately' else None derived = responses_dict.get('derived', get_derived_data(responses_dict)) @@ -79,6 +86,17 @@ def forms_to_file(responses_dict, initial=False): uploaded.append({'doc_type': 'CSA', 'party_code': 2}) uploaded.append({'doc_type': 'AFDO', 'party_code': 2}) + elif signing_location_you == 'Virtual' and signing_location_spouse == 'In-person': + print('got here') + if has_children: + uploaded.append({'doc_type': 'CSA', 'party_code': 1}) + uploaded.append({'doc_type': 'AFDO', 'party_code': 1}) + if has_children: + uploaded.append({'doc_type': 'CSA', 'party_code': 2}) + uploaded.append({'doc_type': 'AFDO', 'party_code': 2}) + if name_change_spouse: + uploaded.append({'doc_type': 'NCV', 'party_code': 2}) + elif (signing_location_both == 'In-person' or signing_location_you == 'In-person' or signing_location_spouse == 'In-person') and how_to_file == 'Online': # at least one party has signed with a commissioner and Filing Online generated.append({'doc_type': 'RFO', 'form_number': 35}) diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 90ddf137..1b279a4d 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -164,6 +164,7 @@ def dashboard_nav(request, nav_step): if nav_step in ('initial_filing', 'final_filing'): _add_error_messages(nav_step, request, responses_dict) + responses_dict['virtual_swearing_enabled'] = settings.VIRTUAL_SWEARING_ENABLED responses_dict['derived'] = get_derived_data(responses_dict) return render(request, template_name=template_name, context=responses_dict) diff --git a/edivorce/settings/base.py b/edivorce/settings/base.py index ad44abdb..b353a8e8 100644 --- a/edivorce/settings/base.py +++ b/edivorce/settings/base.py @@ -203,3 +203,5 @@ OIDC_RP_SCOPES = 'openid email profile' OIDC_AUTH_REQUEST_EXTRA_PARAMS = {'kc_idp_hint': 'bceid'} OIDC_RP_CLIENT_SECRET = env('KEYCLOAK_CLIENT_SECRET', '') OIDC_OP_LOGOUT_URL_METHOD = 'edivorce.apps.core.middleware.keycloak.keycloak_logout' + +VIRTUAL_SWEARING_ENABLED = False diff --git a/edivorce/settings/local.py b/edivorce/settings/local.py index ed5140a2..f5522875 100644 --- a/edivorce/settings/local.py +++ b/edivorce/settings/local.py @@ -51,3 +51,4 @@ OIDC_RP_CLIENT_ID = 'edivorce-app' LOGIN_REDIRECT_URL = '/signin' EFILING_HUB_ENABLED = True +VIRTUAL_SWEARING_ENABLED = False diff --git a/edivorce/settings/openshift.py b/edivorce/settings/openshift.py index 03bd3287..e7f0f215 100644 --- a/edivorce/settings/openshift.py +++ b/edivorce/settings/openshift.py @@ -147,6 +147,9 @@ LOGIN_REDIRECT_URL = PROXY_URL_PREFIX + '/signin' # Enable Efiling Hub EFILING_HUB_ENABLED = True +# Enable virtual swearing +VIRTUAL_SWEARING_ENABLED = False + def monkey_absolutify(request, path): return PROXY_BASE_URL + path