diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index 7d92e96a..a3a36781 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -727,6 +727,22 @@ $(function () { } }); + // The question child_support_in_order is required, but if child support isn't in want_which_orders + // the question is disabled and it is automatically set to NO and saved to the DB + var setWantChildOrder = function () { + var noChildSupportOption = $('input[name="child_support_in_order"][value="NO"]'); + var optionInPage = noChildSupportOption.length > 0; + if (optionInPage) { + var optionIsUnchecked = noChildSupportOption.prop('checked') === false; + var childSupportNotInOrders = noChildSupportOption.data('no_child_order') === true; + if (optionIsUnchecked && childSupportNotInOrders) { + noChildSupportOption.prop('checked', true); + ajaxCall('child_support_in_order', 'NO'); + } + } + } + setWantChildOrder(); + // For Prequalification step 3 // If there is invalid date on reconciliation period, // prevent user from navigate away from the page when user clicks next or back button, or use side navigation diff --git a/edivorce/apps/core/templates/question/06_children_facts.html b/edivorce/apps/core/templates/question/06_children_facts.html index 882a7f31..adab98fd 100644 --- a/edivorce/apps/core/templates/question/06_children_facts.html +++ b/edivorce/apps/core/templates/question/06_children_facts.html @@ -22,7 +22,7 @@ {% include "partials/fact_sheets/fact_sheet_c.html" %} {% endif %} -
diff --git a/edivorce/apps/core/templates/question/06_children_what_for.html b/edivorce/apps/core/templates/question/06_children_what_for.html index eb66340c..23c4fd8a 100644 --- a/edivorce/apps/core/templates/question/06_children_what_for.html +++ b/edivorce/apps/core/templates/question/06_children_what_for.html @@ -89,7 +89,7 @@ {% else %} -