diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index 8a159008..b7f5c5f6 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -580,6 +580,15 @@ $(function () { e.preventDefault(); } }); + $('.positive-float').on('keypress', function(e) { + // keyCode [95-105] - number page + // keyCode [48-57] - 0-9 + // keyCode [8] - backspace + // keyCode [37-40] - directional arrows + if (!((e.which > 95 && e.which < 106) || (e.which > 45 && e.which < 58) || e.which === 8 || (e.keyCode > 36 && e.keyCode < 41))) { + e.preventDefault(); + } + }); $('.fact-sheet-input').on('focus', function() { $(this).closest('td').addClass('table-cell-active'); 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 5167b0d7..b51e67cb 100644 --- a/edivorce/apps/core/templates/question/06_children_what_for.html +++ b/edivorce/apps/core/templates/question/06_children_what_for.html @@ -36,7 +36,7 @@ {% input_field type="radio" class="radio-centered radio-with-other radio_with_textbox" name="child_support_in_order" value="YES" %} {% endif %}
- {% money_input_field name="order_monthly_child_support_amount" class="money positive-integer form-block response-textbox children-input-block" data_mirror="true" data_mirror_target="#child_support_amount_label" %} + {% money_input_field name="order_monthly_child_support_amount" class="money positive-float form-block response-textbox children-input-block" data_mirror="true" data_mirror_target="#child_support_amount_label" %}