From ed7621420b4a47f6f65b77120441f6584bdadc21 Mon Sep 17 00:00:00 2001 From: ariannedee Date: Mon, 14 Sep 2020 15:42:28 -0700 Subject: [PATCH 1/2] DIV-1128: Don't show "Other" in other questions addresses if country is other --- edivorce/apps/core/templatetags/summary_format.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edivorce/apps/core/templatetags/summary_format.py b/edivorce/apps/core/templatetags/summary_format.py index f8fab872..60fdb895 100644 --- a/edivorce/apps/core/templatetags/summary_format.py +++ b/edivorce/apps/core/templatetags/summary_format.py @@ -330,7 +330,7 @@ def combine_address(source): address_you_error = True tags = format_table_data(tags, address_you_name, MISSING_RESPONSE) continue - elif item['value']: + elif item['value'] and item['value'] != 'Other': address_you.append(item['value']) if 'postal_code' in q_id: tags = format_table_data(tags, address_you_name, process_json_list(q_id, address_you)) @@ -342,7 +342,7 @@ def combine_address(source): address_spouse_error = True tags = format_table_data(tags, address_spouse_name, MISSING_RESPONSE) continue - elif item['value']: + elif item['value'] and item['value'] != 'Other': address_spouse.append(item['value']) if 'postal_code' in q_id: tags = format_table_data(tags, address_spouse_name, process_json_list(q_id, address_spouse)) From 765b9efd5df32ac8f4bc64722e1921d5c22e523e Mon Sep 17 00:00:00 2001 From: ariannedee Date: Mon, 14 Sep 2020 15:57:58 -0700 Subject: [PATCH 2/2] DIV-1132: Make sure order_for_child_support shows up in the review page --- edivorce/apps/core/templatetags/summary_format.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/edivorce/apps/core/templatetags/summary_format.py b/edivorce/apps/core/templatetags/summary_format.py index 60fdb895..d134f928 100644 --- a/edivorce/apps/core/templatetags/summary_format.py +++ b/edivorce/apps/core/templatetags/summary_format.py @@ -125,7 +125,7 @@ def reformat_textarea(source, as_ul=True): else: tag = format_html_join( '\n', - '{0}
', + '

{0}

', ((value, '') for value in text_list)) return tag else: @@ -270,17 +270,6 @@ def format_children(context, source): else: item_list = list(filter(lambda x: x['question_id'] == question, working_source)) - # skip child support order related questions if user did not select that option - if question == 'order_for_child_support' and len(item_list): - item = item_list.pop() - if context['derived']['wants_child_support'] is True and item['value']: - # make sure free form text is reformted to be bullet list. - tags = format_html( - '{}{}', - tags, - format_row(item['question__name'], reformat_textarea(item))) - continue - if len(item_list): item = item_list.pop() q_id = item['question_id']