Browse Source

DIV-705

pull/160/head
Justin Johnson 7 years ago
parent
commit
73c294c878
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      edivorce/apps/core/templatetags/format_utils.py

+ 8
- 4
edivorce/apps/core/templatetags/format_utils.py View File

@ -88,10 +88,14 @@ def checkbox(context, *args, **kwargs):
@register.filter @register.filter
def claimantize(value, claimant='1'):
""" Replace 'you' with 'claimant 1' and 'spouse' with 'claimant 2' """
value = value.replace('you', 'claimant\xa0%s' % claimant)
value = value.replace('spouse', 'claimant\xa0%s' % '2' if claimant == '1' else '1')
def claimantize(value):
""" Summarize 'lives with' as Claimant 1, 2, or both """
if 'you' in value:
return 'Claimant 1'
elif 'spouse' in value:
return 'Claimant 2'
elif 'both' in value:
return 'Both'
return value return value


Loading…
Cancel
Save