diff --git a/edivorce/apps/core/templates/question/06_children_facts.html b/edivorce/apps/core/templates/question/06_children_facts.html
index 75868bb0..886d26f4 100644
--- a/edivorce/apps/core/templates/question/06_children_facts.html
+++ b/edivorce/apps/core/templates/question/06_children_facts.html
@@ -1,6 +1,7 @@
{% extends 'base.html' %}
{% load input_field %}
{% load step_order %}
+{% load format_utils %}
{% block title %}{{ block.super }}: Your Children {% endblock %}
@@ -420,7 +421,7 @@
|
- Amount of child support to be paid per month by {% if child_support_payor %}{{ child_support_payor|lower }}{% else %}the payor{% endif %}
+ Amount of child support to be paid per month by {% payorize %}
|
diff --git a/edivorce/apps/core/templatetags/format_utils.py b/edivorce/apps/core/templatetags/format_utils.py
index a9eabd8f..fd134093 100644
--- a/edivorce/apps/core/templatetags/format_utils.py
+++ b/edivorce/apps/core/templatetags/format_utils.py
@@ -120,3 +120,20 @@ def money(amount, symbol=True):
pass
return ''
+
+
+@register.simple_tag(takes_context=True)
+def payorize(context):
+ payor = 'the payor'
+ child_support_payor = context.get('child_support_payor', None)
+ if child_support_payor == 'Myself (Claimant 1)':
+ payor = context.get('name_you', child_support_payor)
+ elif child_support_payor == 'My Spouse (Claimant 2)':
+ payor = context.get('name_spouse', child_support_payor)
+ elif child_support_payor == 'Both myself and my spouse':
+ payor = '{} and {}'.format(context.get('name_you', 'myself'),
+ context.get('name_spouse', 'my spouse'))
+ return payor
+
+
+
|