Browse Source

DIV-501

pull/160/head
Justin Johnson 8 years ago
parent
commit
c7d10af211
4 changed files with 32 additions and 17 deletions
  1. +3
    -4
      edivorce/apps/core/templates/pdf/form38.html
  2. +3
    -4
      edivorce/apps/core/templates/pdf/form38_we.html
  3. +4
    -9
      edivorce/apps/core/templates/pdf/form52.html
  4. +22
    -0
      edivorce/apps/core/templatetags/composites.py

+ 3
- 4
edivorce/apps/core/templates/pdf/form38.html View File

@ -1,4 +1,5 @@
{% load static %} {% load static %}
{% load composites %}
{% load input_field %} {% load input_field %}
{% load format_utils %} {% load format_utils %}
<!doctype html> <!doctype html>
@ -126,8 +127,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 1 shall Pursuant to Section 5 of the Name Act, Claimant 1 shall
bear the name of {{ responses.name_change_you_fullname }} bear the name of {{ responses.name_change_you_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}
@ -135,8 +135,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 2 shall Pursuant to Section 5 of the Name Act, Claimant 2 shall
bear the name of {{ responses.name_change_spouse_fullname }} bear the name of {{ responses.name_change_spouse_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}


+ 3
- 4
edivorce/apps/core/templates/pdf/form38_we.html View File

@ -1,4 +1,5 @@
{% load static %} {% load static %}
{% load composites %}
{% load input_field %} {% load input_field %}
{% load format_utils %} {% load format_utils %}
<!doctype html> <!doctype html>
@ -118,8 +119,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 1 shall Pursuant to Section 5 of the Name Act, Claimant 1 shall
bear the name of {{ responses.name_change_you_fullname }} bear the name of {{ responses.name_change_you_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}
@ -127,8 +127,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 2 shall Pursuant to Section 5 of the Name Act, Claimant 2 shall
bear the name of {{ responses.name_change_spouse_fullname }} bear the name of {{ responses.name_change_spouse_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}


+ 4
- 9
edivorce/apps/core/templates/pdf/form52.html View File

@ -1,4 +1,5 @@
{% load static %} {% load static %}
{% load composites %}
{% load input_field %} {% load input_field %}
{% load format_utils %} {% load format_utils %}
{% load load_json %} {% load load_json %}
@ -99,11 +100,7 @@
{% endif %} {% endif %}
{% else %}<span class="form-entry not-complete"></span>{% endif %} {% else %}<span class="form-entry not-complete"></span>{% endif %}
on {% if responses.when_were_you_married %} {{ responses.when_were_you_married|date_formatter }} {% else %}<span class="form-entry not-complete"></span>{% endif %}, are divorced from each other, on {% if responses.when_were_you_married %} {{ responses.when_were_you_married|date_formatter }} {% else %}<span class="form-entry not-complete"></span>{% endif %}, are divorced from each other,
{% if responses.divorce_take_effect_on == 'the 31st day after the date of this order' %}
the divorce to take effect on the 31st day after the date of this order.
{% else %}
the divorce to take effect on {% if responses.divorce_take_effect_on_specific_date %}{{ responses.divorce_take_effect_on_specific_date|date_formatter }}{% else %}<span class="form-entry not-complete"></span>{% endif %}.
{% endif %}
the divorce to take effect on {% effective_date %}.
</p> </p>
{% endif %} {% endif %}
@ -135,8 +132,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 1 shall Pursuant to Section 5 of the Name Act, Claimant 1 shall
bear the name of {{ responses.name_change_you_fullname }} bear the name of {{ responses.name_change_you_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}
@ -144,8 +140,7 @@
<li> <li>
Pursuant to Section 5 of the Name Act, Claimant 2 shall Pursuant to Section 5 of the Name Act, Claimant 2 shall
bear the name of {{ responses.name_change_spouse_fullname }} bear the name of {{ responses.name_change_spouse_fullname }}
to take effect on the 31st day after the date of this
order.
to take effect on {% effective_date %}.
</li> </li>
{% endif %} {% endif %}


+ 22
- 0
edivorce/apps/core/templatetags/composites.py View File

@ -0,0 +1,22 @@
import sys
from django import template
from .format_utils import date_formatter
register = template.Library()
@register.simple_tag(takes_context=True)
def effective_date(context, *args, **kwargs):
""" Returns the effective date of the divorce, based on user's answers """
effective = 'the 31st day after the date of this order'
if context['responses']['divorce_take_effect_on'] == 'specific date':
date = context['responses']['divorce_take_effect_on_specific_date']
if date == '':
effective = '<span class="form-entry not-complete"></span>'
else:
effective = date_formatter(date)
return effective

Loading…
Cancel
Save