From 49253ac71c67431e3736f378e8a491f765ec4d56 Mon Sep 17 00:00:00 2001 From: Charles Shin Date: Mon, 21 Jan 2019 11:35:34 -0800 Subject: [PATCH] DIV-916: Added new question for asking for child support and updated related logics. --- edivorce/apps/core/static/js/functions.js | 6 ++++ edivorce/apps/core/templates/pdf/form1.html | 4 +-- .../question/06_children_what_for.html | 17 +++++++++-- .../apps/core/templatetags/summary_format.py | 5 ++-- .../apps/core/utils/question_step_mapping.py | 1 + edivorce/apps/core/utils/step_completeness.py | 8 ++++-- edivorce/apps/core/utils/user_response.py | 5 +++- edivorce/fixtures/Question.json | 28 +++++++++++++++---- 8 files changed, 59 insertions(+), 15 deletions(-) diff --git a/edivorce/apps/core/static/js/functions.js b/edivorce/apps/core/static/js/functions.js index 3b0c9a03..399a3618 100644 --- a/edivorce/apps/core/static/js/functions.js +++ b/edivorce/apps/core/static/js/functions.js @@ -156,6 +156,12 @@ var showHideRevealClass = function(el, targetCssClass) { } else { if (targetCssClass !== undefined){ $('.' + targetCssClass).show(); + // This is to handle special case where multiple reveal options applied. + if (targetCssClass === 'support-amount-match') { + if ($("input[name=claimants_agree_to_child_support_amount]:checked").val() === 'YES') { + $('#what_special_provisions').hide(); + } + } } } }; diff --git a/edivorce/apps/core/templates/pdf/form1.html b/edivorce/apps/core/templates/pdf/form1.html index 315ca524..bd6d3580 100644 --- a/edivorce/apps/core/templates/pdf/form1.html +++ b/edivorce/apps/core/templates/pdf/form1.html @@ -420,14 +420,14 @@ - A. {% checkbox responses.order_respecting_arrangement children_of_marriage='YES' want_which_orders='Child support' %} + A. {% checkbox want_parenting_arrangements='YES' children_of_marriage='YES' want_which_orders='Child support' %}
Claimant 1 and Claimant 2 are asking for the following order respecting arrangements for parenting or contact: - {% if responses.children_of_marriage == 'YES' and responses.order_respecting_arrangement and 'Child support' in responses.want_which_orders %} + {% if responses.children_of_marriage == 'YES' and responses.want_parenting_arrangements == 'YES' and responses.order_respecting_arrangement and 'Child support' in responses.want_which_orders %}
    {{ responses.order_respecting_arrangement|striptags|linebreaksli }}
{% 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 c476b5ec..742b5b03 100644 --- a/edivorce/apps/core/templates/question/06_children_what_for.html +++ b/edivorce/apps/core/templates/question/06_children_what_for.html @@ -271,7 +271,7 @@ {% if 'Child support' in want_which_orders|load_json %}
-

If you are asking the court to include an +

Are you asking the court for an order about parenting arrangements or contact - with a child, please indicate the orders you are asking for below. + with a child?

+
+ + + +
+
+ +