diff --git a/edivorce/apps/core/middleware/keycloak.py b/edivorce/apps/core/middleware/keycloak.py index a4260536..5cc68814 100644 --- a/edivorce/apps/core/middleware/keycloak.py +++ b/edivorce/apps/core/middleware/keycloak.py @@ -46,7 +46,5 @@ class EDivorceKeycloakBackend(OIDCAuthenticationBackend): def keycloak_logout(request): request.session.flush() - - redirect_uri = absolutify(request, settings.FORCE_SCRIPT_NAME) - + redirect_uri = absolutify(request, settings.FORCE_SCRIPT_NAME[:-1] + '/logout') return f'{settings.KEYCLOAK_LOGOUT}?redirect_uri={redirect_uri}' diff --git a/edivorce/apps/core/static/js/ajax.js b/edivorce/apps/core/static/js/ajax.js index 0ba06d65..4924ff9f 100644 --- a/edivorce/apps/core/static/js/ajax.js +++ b/edivorce/apps/core/static/js/ajax.js @@ -2,6 +2,12 @@ var ajaxOnChange = function () { var el = $(this); + // strip money fields down to 2 decimal places + if (el.hasClass('money')) { + var moneyValue = parseFloat(el.val()); + el.val(moneyValue.toFixed(2)); + } + // show/hide additional information if needed reveal(el); diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index 419f0730..27c13c43 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -678,14 +678,14 @@ $(function () { $('#check_order_selected').on('click', function (e) { var showAlert = $(this).data('show_alert'); var childSupport = $('#order_child_support').prop('checked'); - var eligible = false; + var childSupportEligible = false; if (!childSupport) { - var children = $('#unselected_child_support_alert').data('children-of-marriage'); - var under19 = $('#unselected_child_support_alert').data('has-children-under-19'); - var over19 = $('#unselected_child_support_alert').data('has-children-over-19'); - var reasons = $('#unselected_child_support_alert').data('children-financial-support'); - reasons = (reasons || []).filter(function(el){ return el !== 'NO'; }).length > 0; - eligible = children === 'YES' && (under19 || (over19 && reasons)); + var hasChildren = $('#unselected_child_support_alert').data('children-of-marriage') === "YES"; + var under19 = $('#unselected_child_support_alert').data('has-children-under-19') === "YES"; + var over19 = $('#unselected_child_support_alert').data('has-children-over-19') === "YES"; + var over19Reasons = $('#unselected_child_support_alert').data('children-financial-support'); + var hasOver19Reasons = (over19Reasons || []).filter(function(el){ return el !== "NO"; }).length > 0; + childSupportEligible = hasChildren && (under19 || (over19 && hasOver19Reasons)); } var proceedNext = $(this).data('proceed'); var showPropertyAlert = false; @@ -702,7 +702,7 @@ $(function () { } }); } - if ((showAlert || (!childSupport && eligible)) && !proceedNext) { + if ((showAlert || (!childSupport && childSupportEligible)) && !proceedNext) { $('#unselected_orders_alert').show(); if (showPropertyAlert) { $('#unselected_property_alert').show(); @@ -710,7 +710,7 @@ $(function () { if (showSpousalAlert) { $('#unselected_spouse_alert').show(); } - if (!childSupport && eligible) { + if (!childSupport && childSupportEligible) { $('#unselected_child_support_alert').show(); } e.preventDefault(); @@ -759,12 +759,6 @@ $(function () { showHideChildrenLiveWithOthers(); $('input[name="has_children_under_19"], input[name="has_children_over_19"], input[name="children_financial_support"]').change(showHideChildrenLiveWithOthers); - - $('.money').on('change', function() { - var value = parseFloat($(this).val()); - $(this).val(value.toFixed(2)); - }); - $('.positive-integer').on('keypress', function(e) { // keyCode [95-105] - number page // keyCode [48-57] - 0-9 @@ -885,27 +879,8 @@ var initializeChildRowControls = function(element) { element.find('#cancel_delete_child').on('click', function() { $('#delete_child_modal').modal('hide'); }); - - $('form#logoutForm').submit(function(e) { - deleteCookie("SMSESSION", "/", ".gov.bc.ca"); - }); }; -var deleteCookie = function(name, path, domain) { - if( getCookie(name) ) { - document.cookie = name + "=" + - ((path) ? ";path="+path:"")+ - ((domain)?";domain="+domain:"") + - ";expires=Thu, 01 Jan 1970 00:00:01 GMT"; - } -} - -var getCookie = function(name){ - return document.cookie.split(';').some(c => { - return c.trim().startsWith(name + '='); - }); -} - var populateChildInputFields = function(element) { $('.children-questions').show(); $('.children-list').hide(); diff --git a/edivorce/apps/core/templates/base.html b/edivorce/apps/core/templates/base.html index 4b3be845..a5db322b 100644 --- a/edivorce/apps/core/templates/base.html +++ b/edivorce/apps/core/templates/base.html @@ -54,7 +54,7 @@
{% if how_to_file == 'Online' %}Missing a form required on this page? Check the Review Forms step.
-Need help with Scanning your documents?
+Need help with Scanning your documents?
First Name
- {% input_field type="text" name=name value=given_1 multiple="true" class="form-block response-textbox alias-given-1" %} + {% input_field type="text" name=name value=given_1 multiple="true" class="form-block response-textbox alias-other-name alias-given-1" %}Middle Name 1
- {% input_field type="text" name=name value=given_2 multiple="true" ignore_error=True class="form-block response-textbox alias-given-2" %} + {% input_field type="text" name=name value=given_2 multiple="true" ignore_error=True class="form-block response-textbox alias-other-name alias-given-2" %}Middle Name 2
- {% input_field type="text" name=name value=given_3 multiple="true" ignore_error=True class="form-block response-textbox alias-given-3" %} + {% input_field type="text" name=name value=given_3 multiple="true" ignore_error=True class="form-block response-textbox alias-other-name alias-given-3" %}Last Name
- {% input_field type="text" name=name value=last_name multiple="true" class="form-block response-textbox alias-last-name" %} + {% input_field type="text" name=name value=last_name multiple="true" class="form-block response-textbox alias-other-name alias-last-name" %}If either of you has had a legal name change since you were married, put that new name on your form, and bring along a copy of the change of name certificate when you file your documents.
++ The name written here must match the name that is on your marriage certificate. If you have changed your + legal name since you were married, add it to the section below titled “Do you go by any other names”. +
If either of you has had a legal name change since you were married, put that new name on - your form, - and bring along a copy of the change of name certificate when you file your documents.
++ The name written here must match your spouses's name that is on your marriage certificate. If they have changed + their legal name since you were married, add it to the section below titled “Does your spouse go by any other names”. +
- You will need a Basic BCeID or BC Services Card account to access the Online Divorce Assistant. + You will need a Basic BCeID account to access the Online Divorce Assistant. This will also enable you to securely access multiple other online government services.