Browse Source

DIV-664

pull/160/head
Justin Johnson 8 years ago
parent
commit
281873a35f
3 changed files with 81 additions and 74 deletions
  1. +72
    -71
      edivorce/apps/core/templates/pdf/form1.html
  2. +3
    -3
      edivorce/apps/core/templates/question/06_children_income_expenses.html
  3. +6
    -0
      edivorce/apps/core/templatetags/format_utils.py

+ 72
- 71
edivorce/apps/core/templates/pdf/form1.html View File

@ -213,6 +213,7 @@
<div class="td-list-text"> <div class="td-list-text">
Claimant 1 and Claimant 2 have not lived together since then Claimant 1 and Claimant 2 have not lived together since then
</div> </div>
<br>
</div> </div>
<div> <div>
<span class="td-list-item"> <span class="td-list-item">
@ -223,28 +224,28 @@
during the following period(s), in an unsuccessful during the following period(s), in an unsuccessful
attempt to reconcile: <br> attempt to reconcile: <br>
[<em>give dates of period(s)</em>]<br><br> [<em>give dates of period(s)</em>]<br><br>
<table class="table table-bordered table-fixed">
{% multiple_values_to_list source=responses.reconciliation_period as periods %}
{% if periods and responses.try_reconcile_after_separated == 'YES' %}
{% for period in periods %}
<tr>
<td>From: {{ period|first|date_formatter }}</td>
<td>To: {{ period|last|date_formatter }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td>From: <span class="form-entry not-complete">&nbsp;</span></td>
<td>To: <span class="form-entry not-complete">&nbsp;</span></td>
</tr>
{% endif %}
</table>
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>
<tr>
{% multiple_values_to_list source=responses.reconciliation_period as periods %}
{% if periods and responses.try_reconcile_after_separated == 'YES' %}
<td>
{% for period in periods %}
<p>from: {{period | first |date_formatter }}</p>
{% endfor %}
</td>
<td>
{% for period in periods %}
<p>to: {{period | last |date_formatter }}</p>
{% endfor %}
</td>
{% else %}
<td><p>From: <span class="form-entry not-complete">&nbsp;</span></p></td>
<td><p>To: <span class="form-entry not-complete">&nbsp;</span></p></td>
{% endif %}
</tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<span class="td-list-item">(ii) {% checkbox False %}</span> <span class="td-list-item">(ii) {% checkbox False %}</span>
@ -384,7 +385,7 @@
<tr> <tr>
<td align="center">{{ child.child_name }}</td> <td align="center">{{ child.child_name }}</td>
<td align="center">{{ child.child_birth_date|date_formatter }} &nbsp;</td> <td align="center">{{ child.child_birth_date|date_formatter }} &nbsp;</td>
<td align="center">{{ child.child_live_with }}</td>
<td align="center">{{ child.child_live_with|claimantize }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>
@ -417,7 +418,7 @@
order respecting arrangements for parenting or order respecting arrangements for parenting or
contact: contact:
<span class="form-entry form-textarea not-complete form-list-textarea"> <span class="form-entry form-textarea not-complete form-list-textarea">
{{ responses.order_respecting_arrangement }}
<ul>{{ responses.order_respecting_arrangement|striptags|linebreaksli }}</ul>
</span> </span>
</div> </div>
</td> </td>
@ -431,7 +432,7 @@
Claimant 1 and Claimant 2 are asking for an order for Claimant 1 and Claimant 2 are asking for an order for
child support as follows: child support as follows:
<span class="form-entry form-textarea not-complete form-list-textarea"> <span class="form-entry form-textarea not-complete form-list-textarea">
{{ responses.order_for_child_support }}
<ul>{{ responses.order_for_child_support|striptags|linebreaksli }}</ul>
</span> </span>
</div> </div>
</td> </td>
@ -467,7 +468,7 @@
<div class="td-list-text"> <div class="td-list-text">
Claimant 1 and Claimant 2 are asking for an order for spousal support as follows:<br> Claimant 1 and Claimant 2 are asking for an order for spousal support as follows:<br>
<span class="form-entry form-textarea not-complete"> <span class="form-entry form-textarea not-complete">
{% if 'Spousal support' in orders and responses.spouse_support_details %}
{% if 'Spousal support' in responses.want_which_orders and responses.spouse_support_details %}
<ul>{{responses.spouse_support_details|striptags|linebreaksli }}</ul> <ul>{{responses.spouse_support_details|striptags|linebreaksli }}</ul>
{% endif %} {% endif %}
</span> </span>
@ -497,56 +498,56 @@
<h3>6. Property and debt</h3> <h3>6. Property and debt</h3>
<table class="table table-bordered"> <table class="table table-bordered">
<tbody>
<tr>
<td>
<div><strong>A. Property claims under the <em>Family Law Act</em></strong><br><br></div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' %}
<tbody>
<tr>
<td>
<div><strong>A. Property claims under the <em>Family Law Act</em></strong><br><br></div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' %}
</span>
<div class="td-list-text">
Claimant 1 and Claimant 2 are asking for an order for:<br><br>
<div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' deal_with_property_debt='Equal division' %}
</span>
<div class="td-list-text">
an equal division of family property and family debt<br><br>
</div>
</div>
<div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' deal_with_property_debt='Unequal division' %}
</span>
<div class="td-list-text">
an unequal division of family property and family debt as follows:
<span class="form-entry form-textarea not-complete">
{% if responses.deal_with_property_debt == 'Unequal division' and responses.how_to_divide_property_debt and 'Division of property and debts' in responses.want_which_orders %}
<ul>{{ responses.how_to_divide_property_debt|striptags|linebreaksli }}</ul>
{% endif %}
</span> </span>
<div class="td-list-text">
Claimant 1 and Claimant 2 are asking for an order for:<br><br>
<div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' deal_with_property_debt='Equal division' %}
</span>
<div class="td-list-text">
an equal division of family property and family debt<br><br>
</div>
</div>
<div>
<span class="td-list-item">
{% checkbox want_which_orders='Division of property and debts' deal_with_property_debt='Unequal division' %}
</span>
<div class="td-list-text">
an unequal division of family property and family debt as follows:
<span class="form-entry form-textarea not-complete">
{% if responses.deal_with_property_debt == 'Unequal division' and responses.how_to_divide_property_debt and responses.want_which_orders == 'Division of property and debts' %}
<ul>{{ responses.how_to_divide_property_debt|striptags|linebreaksli }}</ul>
{% endif %}
</span>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div><strong>B. Other property claims</strong><br><br></div>
<span class="td-list-item">{% checkbox responses.other_property_claims %}</span>
<div class="td-list-text">
Claimant 1 and Claimant 2 ask for an order respecting
an interest in property or for compensation instead
of an interest in that property, as follows:<br>
<span class="form-entry form-textarea not-complete">
{% if responses.other_property_claims %}
<ul>{{ responses.other_property_claims|striptags|linebreaksli }}</ul>
{% endif %}
</span>
</div>
</td>
</tr>
</tbody>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div><strong>B. Other property claims</strong><br><br></div>
<span class="td-list-item">{% checkbox responses.other_property_claims %}</span>
<div class="td-list-text">
Claimant 1 and Claimant 2 ask for an order respecting
an interest in property or for compensation instead
of an interest in that property, as follows:<br>
<span class="form-entry form-textarea not-complete">
{% if responses.other_property_claims %}
<ul>{{ responses.other_property_claims|striptags|linebreaksli }}</ul>
{% endif %}
</span>
</div>
</td>
</tr>
</tbody>
</table> </table>
<h3>7. Other</h3> <h3>7. Other</h3>


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

@ -15,7 +15,7 @@
<div class="radio"> <div class="radio">
<label> <label>
{% input_field type="radio" name="how_will_calculate_income" class="radio-with-other" autocomplete="off" value="using specific rules" data_target_id="annual_gross_income_question" data_invert_target="#agreement_entered_message" data_reveal_target="true" %}
{% input_field type="radio" name="how_will_calculate_income" autocomplete="off" value="using specific rules" data_target_id="annual_gross_income_question" data_invert_target="#agreement_entered_message" data_reveal_target="true" %}
Calculate your income using the Calculate your income using the
<a href="http://laws-lois.justice.gc.ca/eng/regulations/SOR-97-175/page-2.html#h-6" target="_blank"> <a href="http://laws-lois.justice.gc.ca/eng/regulations/SOR-97-175/page-2.html#h-6" target="_blank">
specific rules specific rules
@ -33,7 +33,7 @@
<div class="radio"> <div class="radio">
<label> <label>
{% input_field type="radio" name="how_will_calculate_income" class="radio-with-other" id="how_will_calculate_income_agreement" autocomplete="off" value="entered agreement" data_target_id="annual_gross_income_question" data_invert_target="#agreement_entered_message" data_reveal_target="false" %}
{% input_field type="radio" name="how_will_calculate_income" id="how_will_calculate_income_agreement" autocomplete="off" value="entered agreement" data_target_id="annual_gross_income_question" data_invert_target="#agreement_entered_message" data_reveal_target="false" %}
You and your spouse have come to an agreement as to income ( as per the rules under You and your spouse have come to an agreement as to income ( as per the rules under
<a href="http://laws-lois.justice.gc.ca/eng/regulations/SOR-97-175/page-3.html#docCont" target="_blank"> <a href="http://laws-lois.justice.gc.ca/eng/regulations/SOR-97-175/page-3.html#docCont" target="_blank">
section 21 section 21
@ -914,4 +914,4 @@
</p> </p>
</div> </div>
{% endblock %}
{% endblock %}

+ 6
- 0
edivorce/apps/core/templatetags/format_utils.py View File

@ -80,3 +80,9 @@ def checkbox(context, *args, **kwargs):
return mark_safe('<i class="fa fa%s-square-o" aria-hidden="true"></i>' % return mark_safe('<i class="fa fa%s-square-o" aria-hidden="true"></i>' %
('-check' if args_pass and kwargs_pass else '')) ('-check' if args_pass and kwargs_pass else ''))
@register.filter
def claimantize(value, claimant='1'):
""" Replace 'you' with 'claimant 1' and 'spouse' with 'claimant 2' """
value = value.replace('you', 'claimant %s' % claimant)
value = value.replace('spouse', 'claimant %s' % '2' if claimant == '1' else '1')
return value

Loading…
Cancel
Save