Browse Source

Fixed DIV-446, your marriage defaults to started bug

pull/160/head
Charles Shin 8 years ago
parent
commit
2236faf6a9
2 changed files with 12 additions and 6 deletions
  1. +11
    -5
      edivorce/apps/core/templatetags/summary_format.py
  2. +1
    -1
      edivorce/apps/core/utils/question_step_mapping.py

+ 11
- 5
edivorce/apps/core/templatetags/summary_format.py View File

@ -115,8 +115,8 @@ def combine_address(source):
return ''.join(tags) return ''.join(tags)
@register.simple_tag
def marriage_tag(source):
@register.simple_tag(takes_context=True)
def marriage_tag(context, source):
""" """
Reformat your_marriage step Reformat your_marriage step
Also show/hide optional questions Also show/hide optional questions
@ -137,14 +137,20 @@ def marriage_tag(source):
marital_status_spouse = "" marital_status_spouse = ""
marital_status_spouse_q = "" marital_status_spouse_q = ""
# get married_marriage_like value to check if legally married or not
for question in context.get('prequalification', ''):
if question['question_id'] == 'married_marriage_like' and question['value'] == 'Legally married':
show_all = True
break
elif question['question_id'] == 'married_marriage_like':
break
for item in source: for item in source:
q_id = item['question_id'] q_id = item['question_id']
value = item['value'] value = item['value']
q_name = item['question__name'] q_name = item['question__name']
if q_id == 'married_marriage_like' and value == 'Legally married':
show_all = True
elif q_id == 'when_were_you_married':
if q_id == 'when_were_you_married':
married_date_q = q_name married_date_q = q_name
married_date = value married_date = value
elif q_id == 'when_were_you_live_married_like': elif q_id == 'when_were_you_live_married_like':


+ 1
- 1
edivorce/apps/core/utils/question_step_mapping.py View File

@ -15,7 +15,7 @@ question_step_mapping = {'prequalification': ['married_marriage_like', 'lived_in
'occupation_spouse'], 'occupation_spouse'],
'your_marriage': ['when_were_you_married', 'where_were_you_married_city', 'where_were_you_married_prov', 'your_marriage': ['when_were_you_married', 'where_were_you_married_city', 'where_were_you_married_prov',
'where_were_you_married_country', 'where_were_you_married_other_country', 'marital_status_before_you', 'where_were_you_married_country', 'where_were_you_married_other_country', 'marital_status_before_you',
'marital_status_before_spouse', 'when_were_you_live_married_like', 'married_marriage_like'],
'marital_status_before_spouse', 'when_were_you_live_married_like'],
'your_separation': ['no_reconciliation_possible', 'no_collusion',], 'your_separation': ['no_reconciliation_possible', 'no_collusion',],
'spousal_support': ['spouse_support_details', 'spouse_support_act',], 'spousal_support': ['spouse_support_details', 'spouse_support_act',],
'property_and_debt': ['deal_with_property_debt', 'how_to_divide_property_debt', 'other_property_claims', 'want_other_property_claims'], 'property_and_debt': ['deal_with_property_debt', 'how_to_divide_property_debt', 'other_property_claims', 'want_other_property_claims'],


Loading…
Cancel
Save