Browse Source

Merge pull request #65 from dominikszopa/DIV-973

DIV-973 - Add default checkboxes in Form 35
pull/160/head
Charles Shin 5 years ago
committed by GitHub
parent
commit
320416b60b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 13 deletions
  1. +18
    -12
      edivorce/apps/core/templates/pdf/form35.html
  2. +3
    -1
      edivorce/apps/core/views/pdf.py

+ 18
- 12
edivorce/apps/core/templates/pdf/form35.html View File

@ -1,5 +1,6 @@
{% load static %} {% load static %}
{% load input_field %} {% load input_field %}
{% load format_utils %}
<!doctype html> <!doctype html>
<html class="no-js" lang="en"> <html class="no-js" lang="en">
@ -69,25 +70,30 @@
<div class="checkbox-list"> <div class="checkbox-list">
<p> <p>
<span class="fake-checkbox"></span> draft of the order sought;
{% checkbox True %} draft of the order sought;
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> proof that the case is an undefended family law case;
{% checkbox True %} proof that the case is an undefended family law case;
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> certificate of the registrar in Form F36;
{% checkbox True %} certificate of the registrar in Form F36;
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> filing fee.
{% checkbox True %} filing fee.
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> proof of service of the notice of family claim or counterclaim, as the case may be.
{% checkbox True %} proof of service of the notice of family claim or counterclaim, as the case may be.
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> Child Support Affidavit in Form F37.
{% if responses.num_actual_children > 0 %}
{% checkbox True %}
{% else %}
{% checkbox False %}
{% endif %}
Child Support Affidavit in Form F37.
</p> </p>
<p> <p>
<span class="fake-checkbox"></span> affidavit in Form F38.
{% checkbox True %} affidavit in Form F38.
</p> </p>
</div> </div>
@ -108,8 +114,8 @@
<td class="sig-col4 sig-line-text"> <td class="sig-col4 sig-line-text">
<p>Signature of</p> <p>Signature of</p>
<p style="white-space: nowrap"> <p style="white-space: nowrap">
<span class="fake-checkbox"></span> filing party
<span class="fake-checkbox"></span> lawyer for filing party(ies)
{% checkbox False %} filing party
{% checkbox False %} lawyer for filing party(ies)
</p> </p>
</td> </td>
<td class="sig-col3"></td> <td class="sig-col3"></td>
@ -137,9 +143,9 @@
<td class="sig-col4 sig-line-text"> <td class="sig-col4 sig-line-text">
<p>Signature of</p> <p>Signature of</p>
<p style="white-space: nowrap"> <p style="white-space: nowrap">
<span class="fake-checkbox"></span> filing party
<span class="fake-checkbox"></span> lawyer for filing party(ies)
</p>
{% checkbox False %} filing party
{% checkbox False %} lawyer for filing party(ies)
</p>
</td> </td>
<td class="sig-col3"></td> <td class="sig-col3"></td>
<td class="sig-col5 sig-line-text"> <td class="sig-col5 sig-line-text">


+ 3
- 1
edivorce/apps/core/views/pdf.py View File

@ -22,12 +22,14 @@ def form(request, form_number):
responses = get_responses_from_db(request.user) responses = get_responses_from_db(request.user)
if (form_number == '1' or form_number.startswith('37') or if (form_number == '1' or form_number.startswith('37') or
form_number.startswith('38')):
form_number.startswith('38') or
form_number.startswith('35')):
# Add an array of children that includes blanks for possible children # Add an array of children that includes blanks for possible children
under = int(responses.get('number_children_under_19') or 0) under = int(responses.get('number_children_under_19') or 0)
over = int(responses.get('number_children_under_19') or 0) over = int(responses.get('number_children_under_19') or 0)
actual = json.loads(responses.get('claimant_children', '[]')) actual = json.loads(responses.get('claimant_children', '[]'))
total = len(actual) total = len(actual)
responses['num_actual_children'] = len(actual)
responses['children'] = [actual[i] if i < total else {} responses['children'] = [actual[i] if i < total else {}
for i in range(0, max(under + over, total))] for i in range(0, max(under + over, total))]


Loading…
Cancel
Save