diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index bd76e1b4..33ca5982 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -442,40 +442,19 @@ $(function () { populateChildrenFactSheets(); }); - var updateClaimantName = function() { - var payor = ''; - var element = $('#__claimant_names'); - $("input[name='child_support_payor']:checked").each(function() { - if ($(this).val() === 'Myself (Claimant 1)') { - payor = element.find('input[name="name_you"]').val() || 'Claimant 1'; - } else if ($(this).val() === 'My Spouse (Claimant 2)') { - payor = element.find('input[name="name_spouse"]').val() || 'Claimant 2'; - } else if ($(this).val() === 'Both myself and my spouse') { - payor = (element.find('input[name="name_you"]').val() || 'Claimant 1') + ' and ' + - (element.find('input[name="name_spouse"]').val() || 'Claimant 2'); - } - }); - - $('.__name-of-payor').text(payor); - - // check who has sole custody - var children = JSON.parse($('input[name="claimant_children"]').val()); - var youHaveSoleCustody = children.every(function(child){ - return child.child_live_with === 'Lives with you' - }); - var spouseHasSoleCustody = children.every(function(child){ - return child.child_live_with === 'Lives with spouse' - }); - if (youHaveSoleCustody || spouseHasSoleCustody) { - $('#monthly_amount_question').show(); + var showHideFactSheetF = function() { + var claimant = $(this).val(); + if ( claimant === 'Myself (Claimant 1)' && parseFloat($('input[name="annual_gross_income"]').val()) > 150000) { + $('#fact_sheet_f').show(); + } else if ( claimant === 'My Spouse (Claimant 2)' && parseFloat($('input[name="spouse_annual_gross_income"]').val()) > 150000) { + $('#fact_sheet_f').show(); } else { - $('#monthly_amount_question').hide(); + $('#fact_sheet_f').hide(); } }; - // $('#__claimant_names').each(updateClaimantName); - // $('input[name="child_support_payor"]').on('change', updateClaimantName); + $('input[name="child_support_payor"]').on('click', showHideFactSheetF).filter(':checked').each(showHideFactSheetF); $("#btn_add_reconciliation_periods").on('click', function () { diff --git a/edivorce/apps/core/templates/question/06_children_facts.html b/edivorce/apps/core/templates/question/06_children_facts.html index ef1a35e2..80849b70 100644 --- a/edivorce/apps/core/templates/question/06_children_facts.html +++ b/edivorce/apps/core/templates/question/06_children_facts.html @@ -355,6 +355,9 @@
- Since you have previously indicated that the payor's income is over $150,000 you will need to provide - answers to the next set of questions. The child support guideline table you previously entered only goes - to $150,000. Income beyond that point requires a 2 stage calculation, the amount payable at $150,000 + - the amount payable on the income in excess of $150,000. This takes into account other factors such as - the financial ability of each parent, maintaining a certain quality of life, etc. It is no longer a - matter of there being money simply to look after the needs of the child, but rather the level of care - factoring in the family's lifestyle. -
++ Since you have previously indicated that the payor's income is over $150,000 you will need to provide + answers to the next set of questions. The child support guideline table you previously entered only goes + to $150,000. Income beyond that point requires a 2 stage calculation, the amount payable at $150,000 + + the amount payable on the income in excess of $150,000. This takes into account other factors such as + the financial ability of each parent, maintaining a certain quality of life, etc. It is no longer a + matter of there being money simply to look after the needs of the child, but rather the level of care + factoring in the family's lifestyle. +
--
+
- If the paying parent earns more than $150,000 per year, you may need to calculate both incomes. - The Federal Guidelines provide two options: -
-- In some cases: -
-- Source: The - {% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step5-etap5.html#h7" link_text="Federal Child Support Guidelines" %} - Department of Justice -
++ If the paying parent earns more than $150,000 per year, you may need to calculate both incomes. + The Federal Guidelines provide two options: +
++ In some cases: +
++ Source: The + {% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step5-etap5.html#h7" link_text="Federal Child Support Guidelines" %} + Department of Justice +
-| - | Amount | -||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - How many child(ren) are you asking for support? - | -- {% input_field type="number" name="number_children_seeking_support" class="fact-sheet-input" %} - | -||||||||||||||
|
- - What is the monthly - {% include "partials/tooltip_link_federal_child_support_guidelines.html" with reference_link="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" link_text="Child Support Guidelines" %} - amount for $150,000? - - {% include "partials/inline_question_determine_amount_to_pay.html" with collapse_target_id="collapse_guideline_amount" %} - |
-
-
- {% money_input_field name="child_support_amount_under_high_income" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
-
- |
- ||||||||||||||
- What is the % of income over $150,000 from the
+
|
+
+
+ {% money_input_field name="amount_income_over_high_income_limit" class="fact-sheet-input guideline-amount money" data_sum="true" data_sum_class="guideline-amount" data_sum_target_id="total_amount" %}
+
+ |
+ ||||||||||||||
| + Guidelines table amount + | +
+
+ {% money_input_field name="total_guideline_amount" id="total_amount" class="fact-sheet-input money" readonly="" data_mirror="true" data_mirror_target="#agreed_total_amount" data_mirror_broadcast_change="true" %}
+
+ |
+