Browse Source

DIV-1217: Add flag to turn off virtual swearing

pull/172/head
ariannedee 5 years ago
parent
commit
3c58fc5be6
9 changed files with 246 additions and 154 deletions
  1. +14
    -1
      edivorce/apps/core/static/js/signing-filing.js
  2. +4
    -1
      edivorce/apps/core/templates/dashboard/final_filing.html
  3. +167
    -149
      edivorce/apps/core/templates/dashboard/sign_file_options.html
  4. +33
    -0
      edivorce/apps/core/tests/test_filing_documents.py
  5. +21
    -3
      edivorce/apps/core/utils/efiling_documents.py
  6. +1
    -0
      edivorce/apps/core/views/main.py
  7. +2
    -0
      edivorce/settings/base.py
  8. +1
    -0
      edivorce/settings/local.py
  9. +3
    -0
      edivorce/settings/openshift.py

+ 14
- 1
edivorce/apps/core/static/js/signing-filing.js View File

@ -1,6 +1,9 @@
$(window).load(function () { $(window).load(function () {
function setSignSeparatelyDefaults() { function setSignSeparatelyDefaults() {
// Set sign together default so if the user chooses it, it is reset
$("#sign-in-person-both").prop('checked', true).trigger('change'); $("#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) { if ($("input:radio[name='signing_location_you']:checked").length === 0) {
$("#sign-in-person-you").prop('checked', true).trigger('change'); $("#sign-in-person-you").prop('checked', true).trigger('change');
} }
@ -10,8 +13,11 @@ $(window).load(function () {
} }
function setSignTogetherDefaults() { 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-you").prop('checked', true).trigger('change');
$("#sign-in-person-spouse").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) { if ($("input:radio[name='signing_location']:checked").length === 0) {
$("#sign-in-person-both").prop('checked', true).trigger('change'); $("#sign-in-person-both").prop('checked', true).trigger('change');
} }
@ -91,12 +97,19 @@ $(window).load(function () {
$("#sign-together").prop('checked', true).trigger('change'); $("#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) { if ($("input:radio[name='how_to_file']").length === 0) {
ajaxCall('how_to_file', 'In-person'); ajaxCall('how_to_file', 'In-person');
} else if ($("input:radio[name='how_to_file']:checked").length === 0) { } else if ($("input:radio[name='how_to_file']:checked").length === 0) {
$("#file-online").prop('checked', true).trigger('change'); $("#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 // Set signing and filing defaults if the signing option is on the page


+ 4
- 1
edivorce/apps/core/templates/dashboard/final_filing.html View File

@ -94,6 +94,7 @@
<div class="upload-area"> <div class="upload-area">
{% if how_to_sign == 'Together' and signing_location == 'Virtual' %} {% if how_to_sign == 'Together' and signing_location == 'Virtual' %}
{% elif how_to_sign == 'Separately' and signing_location_you == 'Virtual' and signing_location_spouse == 'Virtual' %} {% elif how_to_sign == 'Separately' and signing_location_you == 'Virtual' and signing_location_spouse == 'Virtual' %}
{% elif how_to_sign == 'Separately' and signing_location_you == 'Virtual' and signing_location_spouse == 'In-person' %}
{% else %} {% else %}
<p> <p>
The following forms will be automatically filed for you: The following forms will be automatically filed for you:
@ -259,7 +260,9 @@
</div> </div>
{% endif %} {% endif %}
{% else %} {% else %}
hello
<p>
You must select how you want to file in the <a href="{% url 'dashboard_nav' 'sign_file_options' %}">Signing & Filing Options</a> step.
</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if final_filing_submitted != 'True' and how_to_file == 'Online' %} {% if final_filing_submitted != 'True' and how_to_file == 'Online' %}


+ 167
- 149
edivorce/apps/core/templates/dashboard/sign_file_options.html View File

@ -8,160 +8,178 @@
{% block container_col %}signing-filing{% endblock %} {% block container_col %}signing-filing{% endblock %}
{% block content %} {% block content %}
<h1>Signing and Filing Options</h1>
<h3>Signing Options</h3>
<p>
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.
</p>
<div class="question-well">
<h3>Select how you would like to {% include "partials/tooltips/swear_affirm.html" %}
your {% include "partials/tooltips/affidavit.html" %}:</h3>
<div class="radio"><label>{% input_field type="radio" name="how_to_sign" value="Together" id="sign-together" %}
We will swear/affirm and sign Together using the same affidavit(s)</label></div>
<div class="list-item-description">
<p>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.</p>
<p>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:</p>
<ul>
<li>At the same time as you are filing your {% include "partials/tooltips/joint_family_claim_1.html" %} (You can file the Notice and swear/affirm and sign your affidavit at
the registry (or virtually with the registry) at the same time.)</li>
<p style="margin-top: 20px">OR</p>
<li>After you've filed your {% include "partials/tooltips/joint_family_claim_1.html" %}. (You can file the Notice first, and then come back into this tool or go to the
registry to file your affidavit(s).)
</li>
</ul>
</div>
<div class="radio"><label>{% input_field type="radio" name="how_to_sign" value="Separately" id="sign-separately" %}
We will swear/affirm and sign Separately our own affidavit(s)</label></div>
<div class="list-item-description">
<p>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)).</p>
<p>There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}. You must:</p>
<ul>
<li>Swear/affirm and sign one person’s affidavit(s) at the same time as you are filing your {% include "partials/tooltips/joint_family_claim_1.html" %} (You can file the
Notice and swear your affidavit at the registry (or virtually with the registry) at the same time.) This would allow one party to
swear/affirm and sign their affidavit(s) before the Notice has been filed.</li>
<p style="margin-top: 20px">OR</p>
<li>Swear/affirm and sign both parties’ affidavit(s) after you've filed your {% include "partials/tooltips/joint_family_claim_1.html" %}. (You can file the Notice first,
and then come back into this tool or go to the registry to file your affidavit(s).)</li>
</ul>
</div>
</div>
<h3>Filing Options</h3>
{% if where_were_you_married_country == 'Canada' %}
<p>You can file (?) your application for divorce in different ways.</p>
{% endif %}
<p>To file (?) your documents, you will need:</p>
<ul>
<li>a printer (or a print service)</li>
<li>payment for filing fees (see More Information sidebar for more information)</li>
<li>a copy of your marriage certificate (from any jurisdiction)</li>
<li><span class="tooltip-link" data-toggle="tooltip" data-placement="right"
data-html="true"
title="
<b>Registration of Joint Divorce Proceedings (JUS280)</b>
<br /><br />
This form is for a central divorce registry in Ottawa. They use the form to check to make sure there is no other divorce proceeding pending in Canada. They also keep track of all divorces in Canada.
<br />- Does not require signatures.">
Registration of Divorce Proceedings<i class="fa fa-question-circle" aria-hidden="true"></i></span> form</li>
<li>Both you and your spouse to sign some of the same documents</li>
<li>You will need to have your affidavit(s) sworn/affirmed (see above)</li>
<li>Photo ID</li>
</ul>
{% if where_were_you_married_country == 'Canada' %}
<h1>Signing and Filing Options</h1>
<h3>Signing Options</h3>
<p>
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.
</p>
<div class="question-well"> <div class="question-well">
<h3>Select how you would like to file (?) your documents:</h3>
<div class="radio"><label>{% input_field type="radio" name="how_to_file" value="Online" id="file-online" %}
We will file Online through this tool</label></div>
<h3>Select how you would like to {% include "partials/tooltips/swear_affirm.html" %}
your {% include "partials/tooltips/affidavit.html" %}:</h3>
<div class="radio"><label>{% input_field type="radio" name="how_to_sign" value="Together" id="sign-together" %}
We will swear/affirm and sign Together using the same affidavit(s)</label></div>
<div class="list-item-description"> <div class="list-item-description">
<p>To file online you will also need:</p>
<p>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.</p>
<p>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:</p>
<ul> <ul>
<li>a scanner or mobile phone with a camera capable of scanning your documents</li>
<li>a credit card</li>
<li>your marriage certificate must be from a Canadian jurisdiction only</li>
<li>At the same time as you are filing your {% include "partials/tooltips/joint_family_claim_1.html" %}
(You can file the Notice and swear/affirm and sign your affidavit at
the registry (or virtually with the registry) at the same time.)
</li>
<p style="margin-top: 20px">OR</p>
<li>After you've filed your {% include "partials/tooltips/joint_family_claim_1.html" %}.
(You can file the Notice first, and then come back into this tool or go to the registry to file your affidavit(s).)
</li>
</ul> </ul>
</div> </div>
<div class="radio"><label>{% input_field type="radio" name="how_to_file" value="In-person" id="file-in-person" %}
We will file In-person at the court registry (you can also mail the documents to the court registry)</label></div>
<div class="radio"><label>{% input_field type="radio" name="how_to_sign" value="Separately" id="sign-separately" %}
We will swear/affirm and sign Separately our own affidavit(s)</label></div>
<div class="list-item-description"> <div class="list-item-description">
<p>To file in-person you need only the items list above under Filing Options.</p>
<p>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)).</p>
<p>There are strict rules for when you can swear/affirm and sign your {% include "partials/tooltips/form_desk_order_38.html" %}.
You must:</p>
<ul>
<li>Swear/affirm and sign one person’s affidavit(s) at the same time as you are filing
your {% include "partials/tooltips/joint_family_claim_1.html" %} (You can file the
Notice and swear your affidavit at the registry (or virtually with the registry) at the same time.)
This would allow one party to swear/affirm and sign their affidavit(s) before the Notice has been filed.
</li>
<p style="margin-top: 20px">OR</p>
<li>Swear/affirm and sign both parties’ affidavit(s) after you've filed
your {% include "partials/tooltips/joint_family_claim_1.html" %}. (You can file the Notice first,
and then come back into this tool or go to the registry to file your affidavit(s).)
</li>
</ul>
</div> </div>
</div> </div>
{% else %}
<div class="question-well">
<h3>File your documents in-person at the court registry (you can also mail the documents to the court registry)</h3>
<p>Based on your previous selections, you must file In-person.</p>
<p>To file in-person you need only the items listed under Filing Options.</p>
</div>
{% endif %}
<h3 id="signing-location" hidden>Swear/Affirm and Signing Location</h3>
<div class="question-well" id="signing-location-together" hidden>
<h3>Select where you would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location" value="In-person" id="sign-in-person-both" %}
We will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location" value="Virtual" id="sign-virtual-both" %}
We will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label> - You will require a computer with internet access and a webcam
</div>
</div>
<div class="question-well" id="signing-location-separately" hidden>
<h3>Select where you would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location_you" value="In-person" id="sign-in-person-you" %}
I will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location_you" value="Virtual" id="sign-virtual-you" %}
I will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label>
</div>
<div class="list-item-description">
- Requires a computer with internet access and a webcam
</div>
<h3>Select where your spouse would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location_spouse" value="In-person" id="sign-in-person-spouse" %}
My spouse will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location_spouse" value="Virtual" id="sign-virtual-spouse" %}
My spouse will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label>
</div>
<div class="list-item-description">
- Requires a computer with internet access and a webcam
</div>
</div>
<div id="sign-virtually" hidden>
<h3>Signing Contact(s)</h3>
<p>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?</p>
<input type="text" id="existing-email-you" value="{{ address_to_send_official_document_email_you }}" hidden>
<input type="text" id="existing-email-spouse" value="{{ address_to_send_official_document_email_spouse }}" hidden>
<div id="email-you" class="form-inline">
<label>E-mail Address for You: </label>{% input_field type="text" name="email_you" id="email-you-input" class="input-inline form-control" %}
</div>
<div id="email-spouse" class="form-inline">
<label>E-mail Address for Your Spouse: </label>{% input_field type="text" name="email_spouse" id="email-spouse-input" class="input-inline form-control" %}
</div>
</div>
<div class="question-well" id="sign-in-person" hidden>
<p>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.</p>
</div>
<h3>Filing Options</h3>
{% if where_were_you_married_country == 'Canada' %}
<p>You can file (?) your application for divorce in different ways.</p>
{% endif %}
<p>To file (?) your documents, you will need:</p>
<div class="information-message bg-danger add-top-margin" id="unfilled-email-alert" hidden>
<p>
You must provide a valid email for the following field(s) before you can continue:
</p>
<ul> <ul>
<li id="error-email-you">E-mail Address for You</li>
<li id="error-email-spouse">E-mail Address for Your Spouse</li>
<li>a printer (or a print service)</li>
<li>payment for filing fees (see More Information sidebar for more information)</li>
<li>a copy of your marriage certificate (from any jurisdiction)</li>
<li><span class="tooltip-link" data-toggle="tooltip" data-placement="right"
data-html="true"
title="
<b>Registration of Joint Divorce Proceedings (JUS280)</b>
<br /><br />
This form is for a central divorce registry in Ottawa. They use the form to check to make sure there is no other divorce proceeding pending in Canada. They also keep track of all divorces in Canada.
<br />- Does not require signatures.">
Registration of Divorce Proceedings<i class="fa fa-question-circle" aria-hidden="true"></i></span> form
</li>
<li>Both you and your spouse to sign some of the same documents</li>
<li>You will need to have your affidavit(s) sworn/affirmed (see above)</li>
<li>Photo ID</li>
</ul> </ul>
</div>
{% if where_were_you_married_country == 'Canada' %}
<div class="question-well">
<h3>Select how you would like to file (?) your documents:</h3>
<div class="radio"><label>{% input_field type="radio" name="how_to_file" value="Online" id="file-online" %}
We will file Online through this tool</label></div>
<div class="list-item-description">
<p>To file online you will also need:</p>
<ul>
<li>a scanner or mobile phone with a camera capable of scanning your documents</li>
<li>a credit card</li>
<li>your marriage certificate must be from a Canadian jurisdiction only</li>
</ul>
</div>
<div class="radio"><label>{% input_field type="radio" name="how_to_file" value="In-person" id="file-in-person" %}
We will file In-person at the court registry (you can also mail the documents to the court registry)</label></div>
<div class="list-item-description">
<p>To file in-person you need only the items list above under Filing Options.</p>
</div>
</div>
{% else %}
<div class="question-well">
<h3>File your documents in-person at the court registry (you can also mail the documents to the court registry)</h3>
<p>Based on your previous selections, you must file In-person.</p>
<p>To file in-person you need only the items listed under Filing Options.</p>
</div>
{% endif %}
{% if virtual_swearing_enabled %}
<h3 id="signing-location" hidden>Swear/Affirm and Signing Location</h3>
<div class="question-well" id="signing-location-together" hidden>
<h3>Select where you would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location" value="In-person" id="sign-in-person-both" %}
We will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location" value="Virtual" id="sign-virtual-both" %}
We will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label> - You will
require a computer with internet access and a webcam
</div>
</div>
<div class="question-well" id="signing-location-separately" hidden>
<h3>Select where you would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location_you" value="In-person" id="sign-in-person-you" %}
I will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location_you" value="Virtual" id="sign-virtual-you" %}
I will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label>
</div>
<div class="list-item-description">
- Requires a computer with internet access and a webcam
</div>
<h3>Select where your spouse would like to {% include "partials/tooltips/swear_affirm.html" %} your affidavit(s):</h3>
<div class="radio"><label>{% input_field type="radio" name="signing_location_spouse" value="In-person" id="sign-in-person-spouse" %}
My spouse will sign with a lawyer, notary or other {% include "partials/tooltips/commissioner.html" with hover=True %} for taking affidavits
</label></div>
<div class="radio"><label>{% input_field type="radio" name="signing_location_spouse" value="Virtual" id="sign-virtual-spouse" %}
My spouse will sign in a {% include "partials/tooltips/virtual_session.html" with hover=True %} with the court registry</label>
</div>
<div class="list-item-description">
- Requires a computer with internet access and a webcam
</div>
</div>
<div id="sign-virtually" hidden>
<h3>Signing Contact(s)</h3>
<p>
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?
</p>
<input type="text" id="existing-email-you" value="{{ address_to_send_official_document_email_you }}" hidden>
<input type="text" id="existing-email-spouse" value="{{ address_to_send_official_document_email_spouse }}" hidden>
<div id="email-you" class="form-inline">
<label>E-mail Address for You: </label>
{% input_field type="text" name="email_you" id="email-you-input" class="input-inline form-control" %}
</div>
<div id="email-spouse" class="form-inline">
<label>E-mail Address for Your Spouse: </label>
{% input_field type="text" name="email_spouse" id="email-spouse-input" class="input-inline form-control" %}
</div>
</div>
<div class="question-well" id="sign-in-person" hidden>
<p>
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.
</p>
</div>
<div class="information-message bg-danger add-top-margin" id="unfilled-email-alert" hidden>
<p>
You must provide a valid email for the following field(s) before you can continue:
</p>
<ul>
<li id="error-email-you">E-mail Address for You</li>
<li id="error-email-spouse">E-mail Address for Your Spouse</li>
</ul>
</div>
{% endif %}
{% endblock %} {% endblock %}
{% block backToDashboard %} {% block backToDashboard %}
<!-- no back to dashboard -->
<!-- no back to dashboard -->
{% endblock %} {% endblock %}
{% block formBack %}{% url 'overview' %}{% endblock %} {% block formBack %}{% url 'overview' %}{% endblock %}
@ -171,17 +189,17 @@
{% block sidebarText %} {% block sidebarText %}
<h3>What is the process to file for divorce?</h3> <h3>What is the process to file for divorce?</h3>
<p>Ultimately you need to file (submit) your divorce with the Court Registry. <p>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.</p>
Assuming everything goes well, your divorce will be reviewed by the
Court Registry and passed along to a judge for approval.</p>
<p>This tool will create a number of the key forms required for filing automatically. <p>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.
</p> </p>
<p>The remaining steps in this tool will walk you through the different forms you'll need <p>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.</p>
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.</p>
<p>Once you've got your paperwork together, completed, signed and sworn, you can file it with <p>Once you've got your paperwork together, completed, signed and sworn, you can file it with
the Court Registry.</p>
the Court Registry.</p>
{% endblock %} {% endblock %}

+ 33
- 0
edivorce/apps/core/tests/test_filing_documents.py View File

@ -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': 1}, uploaded)
self.assertIn({'doc_type': doc_type("child support affidavit"), 'party_code': 2}, 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): def test_final_forms_to_file_in_person(self):
self.create_response('how_to_sign', 'Together') self.create_response('how_to_sign', 'Together')
self.create_response('signing_location', 'In-person') self.create_response('signing_location', 'In-person')


+ 21
- 3
edivorce/apps/core/utils/efiling_documents.py View File

@ -1,3 +1,5 @@
from django.conf import settings
from edivorce.apps.core.utils.derived import get_derived_data 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_file = responses_dict.get('how_to_file')
how_to_sign = responses_dict.get('how_to_sign') 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)) 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': 'CSA', 'party_code': 2})
uploaded.append({'doc_type': 'AFDO', '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': 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 # at least one party has signed with a commissioner and Filing Online
generated.append({'doc_type': 'RFO', 'form_number': 35}) generated.append({'doc_type': 'RFO', 'form_number': 35})


+ 1
- 0
edivorce/apps/core/views/main.py View File

@ -164,6 +164,7 @@ def dashboard_nav(request, nav_step):
if nav_step in ('initial_filing', 'final_filing'): if nav_step in ('initial_filing', 'final_filing'):
_add_error_messages(nav_step, request, responses_dict) _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) responses_dict['derived'] = get_derived_data(responses_dict)
return render(request, template_name=template_name, context=responses_dict) return render(request, template_name=template_name, context=responses_dict)


+ 2
- 0
edivorce/settings/base.py View File

@ -203,3 +203,5 @@ OIDC_RP_SCOPES = 'openid email profile'
OIDC_AUTH_REQUEST_EXTRA_PARAMS = {'kc_idp_hint': 'bceid'} OIDC_AUTH_REQUEST_EXTRA_PARAMS = {'kc_idp_hint': 'bceid'}
OIDC_RP_CLIENT_SECRET = env('KEYCLOAK_CLIENT_SECRET', '') OIDC_RP_CLIENT_SECRET = env('KEYCLOAK_CLIENT_SECRET', '')
OIDC_OP_LOGOUT_URL_METHOD = 'edivorce.apps.core.middleware.keycloak.keycloak_logout' OIDC_OP_LOGOUT_URL_METHOD = 'edivorce.apps.core.middleware.keycloak.keycloak_logout'
VIRTUAL_SWEARING_ENABLED = False

+ 1
- 0
edivorce/settings/local.py View File

@ -51,3 +51,4 @@ OIDC_RP_CLIENT_ID = 'edivorce-app'
LOGIN_REDIRECT_URL = '/signin' LOGIN_REDIRECT_URL = '/signin'
EFILING_HUB_ENABLED = True EFILING_HUB_ENABLED = True
VIRTUAL_SWEARING_ENABLED = False

+ 3
- 0
edivorce/settings/openshift.py View File

@ -147,6 +147,9 @@ LOGIN_REDIRECT_URL = PROXY_URL_PREFIX + '/signin'
# Enable Efiling Hub # Enable Efiling Hub
EFILING_HUB_ENABLED = True EFILING_HUB_ENABLED = True
# Enable virtual swearing
VIRTUAL_SWEARING_ENABLED = False
def monkey_absolutify(request, path): def monkey_absolutify(request, path):
return PROXY_BASE_URL + path return PROXY_BASE_URL + path


Loading…
Cancel
Save