Browse Source

DIV-801: show schedule 1 question only if either parent has sole custody

pull/160/head
Benard Ebinu 7 years ago
parent
commit
47dd4e0674
2 changed files with 19 additions and 1 deletions
  1. +16
    -0
      edivorce/apps/core/static/js/main.js
  2. +3
    -1
      edivorce/apps/core/templates/question/06_children_income_expenses.html

+ 16
- 0
edivorce/apps/core/static/js/main.js View File

@ -443,6 +443,22 @@ $(function () {
populateChildrenFactSheets();
});
// check who has sole custody
$('input[name="__claimant_children"]').each(function() {
var children = JSON.parse($(this).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();
} else {
$('#monthly_amount_question').hide();
}
});
var payorCallback = function() {
var claimant = $(this).val();


+ 3
- 1
edivorce/apps/core/templates/question/06_children_income_expenses.html View File

@ -248,7 +248,9 @@
</div>
</div>
<div class="question-well" id="monthly_amount_question">
<input type="text" name="__claimant_children" value="{{ claimant_children }}" hidden >
<div class="question-well" id="monthly_amount_question" hidden>
<h3>What is the monthly child support amount (as per
<a href="http://laws-lois.justice.gc.ca/eng/regulations/SOR-97-175/page-5.html#h-9" target="_blank">Schedule 1</a>
of the guidelines) that is payable by claimant?</h3>


Loading…
Cancel
Save