Browse Source

DIV-519: synchronize when show error messages so easier for user to follow where the problem is

pull/160/head
Benard Ebinu 8 years ago
parent
commit
3b2743675a
2 changed files with 15 additions and 7 deletions
  1. +11
    -3
      edivorce/apps/core/static/js/functions.js
  2. +4
    -4
      edivorce/apps/core/templates/question/01_orders.html

+ 11
- 3
edivorce/apps/core/static/js/functions.js View File

@ -38,10 +38,18 @@ var reveal = function(el) {
}
}
} else if (invert_target !== undefined) {
if (el.data("reveal_target")) {
$(invert_target).hide();
if ((el.is(':checkbox') || el.is(':radio')) && el.data("reveal_target")) {
if (el.prop('checked')) {
$(invert_target).hide();
} else {
$(invert_target).show();
}
} else {
$(invert_target).show();
if (el.data("reveal_target")) {
$(invert_target).hide();
} else {
$(invert_target).show();
}
}
}


+ 4
- 4
edivorce/apps/core/templates/question/01_orders.html View File

@ -45,7 +45,7 @@ asked to provide details for each request.</p>
<div class="question-well">
<div class="checkbox">
<label>
{% input_field type="checkbox" name="want_which_orders" value="Spousal support" data_target_id="spouse_support_alert" data_reveal_target="true" %}
{% input_field type="checkbox" name="want_which_orders" value="Spousal support" data_target_id="spouse_support_alert" data_invert_target=".orders-alert" data_reveal_target="true" %}
<b>Spousal support</b>
</label>
</div>
@ -146,7 +146,7 @@ asked to provide details for each request.</p>
<div class="question-well">
<div class="checkbox">
<label>
{% input_field type="checkbox" name="want_which_orders" value="Child support" data_target_id="child_support_alert" data_reveal_target="true" %}
{% input_field type="checkbox" name="want_which_orders" value="Child support" data_target_id="child_support_alert" data_invert_target=".orders-alert" data_reveal_target="true" %}
<b>Child Support</b>
</label>
<span class="tooltip-link" data-toggle="tooltip" data-placement="auto"
@ -202,8 +202,8 @@ asked to provide details for each request.</p>
<div class="checkbox"><label>{% input_field type="checkbox" name="want_which_orders" value="Child support" %}<b>Child support (Out of scope)</b></label></div>
{% endcomment %}
<div class="information-message bg-danger add-top-margin" id="unselected_orders_alert" hidden>
<div id="unselected_spouse_property_alert" hidden>
<div class="information-message bg-danger add-top-margin orders-alert" id="unselected_orders_alert" hidden>
<div class="orders-alert" id="unselected_spouse_property_alert" hidden>
<p>We've noticed that at this point in time you are not applying for
spousal support and/or division of property, debt, or a pension. If you
decide to request these items in the future there are some time


Loading…
Cancel
Save