diff --git a/edivorce/apps/core/templates/pdf/form1.html b/edivorce/apps/core/templates/pdf/form1.html
index 34d3ff76..8433417e 100644
--- a/edivorce/apps/core/templates/pdf/form1.html
+++ b/edivorce/apps/core/templates/pdf/form1.html
@@ -336,9 +336,8 @@
B Other property claims
- {% check_list source=responses.want_other_property_claims value='Ask for other property claims' as other_wanted %}
- Claimant 1 and Claimant 2 ask for an order respecting an interest in property or for compensation instead of an interest in that property, as follows:
- {% if other_wanted and responses.other_property_claims %} {{ responses.other_property_claims|striptags|linebreaksul }} {% else %} {% endif %}
+ Claimant 1 and Claimant 2 ask for an order respecting an interest in property or for compensation instead of an interest in that property, as follows:
+ {% if responses.other_property_claims %} {{ responses.other_property_claims|striptags|linebreaksul }} {% else %} {% endif %}
@@ -348,7 +347,7 @@
{% check_list source=responses.want_which_orders value='Other orders' as order_wanted %}
- Claimant 1 and Claimant 2 are asking for an order in the following terms: {% if responses.other_orders_detail %} {{ responses.other_orders_detail|striptags|linebreaksul }} {% else %} {% endif %}
+ Claimant 1 and Claimant 2 are asking for an order in the following terms: {% if responses.other_orders_detail and order_wanted %} {{ responses.other_orders_detail|striptags|linebreaksul }} {% else %} {% endif %}
[set out terms of proposed order ]
diff --git a/edivorce/apps/core/templates/question/07_property.html b/edivorce/apps/core/templates/question/07_property.html
index ce28452c..2bf5bc41 100644
--- a/edivorce/apps/core/templates/question/07_property.html
+++ b/edivorce/apps/core/templates/question/07_property.html
@@ -129,7 +129,7 @@
- {% input_field type="checkbox" name="want_other_property_claims" value="Ask for other property claims" %} Claimant 1 and Claimant 2 ask for an order respecting an interest in property or for compensation instead of an interest in that property, as follows:
+ Claimant 1 and Claimant 2 ask for an order respecting an interest in property or for compensation instead of an interest in that property, as follows:
diff --git a/edivorce/apps/core/templatetags/summary_format.py b/edivorce/apps/core/templatetags/summary_format.py
index 6bdde37a..bbf2aa0c 100644
--- a/edivorce/apps/core/templatetags/summary_format.py
+++ b/edivorce/apps/core/templatetags/summary_format.py
@@ -192,7 +192,7 @@ def property_tag(source):
second_column = ' '
end_tag = ' '
- division = division_detail = want_other = other_detail = None
+ division = division_detail = other_detail = None
for item in source:
q_id = item['question_id']
@@ -201,8 +201,6 @@ def property_tag(source):
division = item
elif q_id == 'how_to_divide_property_debt':
division_detail = item
- elif q_id == 'want_other_property_claims':
- want_other = item
elif q_id == 'other_property_claims':
other_detail = item
@@ -210,7 +208,7 @@ def property_tag(source):
tags.append(first_column + division['question__name'] + second_column + division['value'] + end_tag)
if division and division['value'] == "Unequal division" and division_detail:
tags.append(first_column + division_detail['question__name'] + second_column + process_list(division_detail['value'].split('\n'), division_detail['question_id']) + end_tag)
- if want_other and other_detail:
+ if other_detail and other_detail['value'].strip():
tags.append(first_column + other_detail['question__name'] + second_column + process_list(other_detail['value'].split('\n'), other_detail['question_id']) + end_tag)
return ''.join(tags)
diff --git a/edivorce/apps/core/tests.py b/edivorce/apps/core/tests.py
index 858ef592..d28a653a 100644
--- a/edivorce/apps/core/tests.py
+++ b/edivorce/apps/core/tests.py
@@ -342,41 +342,42 @@ class UserResponseTestCase(TestCase):
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
self.assertEqual(is_complete(step, lst)[0], False)
- # All required question with no hidden shown
+ # Only one required question with no hidden shown
create_response(user, 'deal_with_property_debt', 'Equal division')
- lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
- self.assertEqual(is_complete(step, lst)[0], True)
-
- # All required question with hidden shown but no response
- UserResponse.objects.filter(question_id='deal_with_property_debt').update(value="Unequal division")
-
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
self.assertEqual(is_complete(step, lst)[0], False)
- # Only one required question with hidden shown and answered
- create_response(user, 'how_to_divide_property_debt', 'Do not divide them')
+ # All required question with hidden shown and answered
+ create_response(user, 'other_property_claims', 'Want these property claims')
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
self.assertEqual(is_complete(step, lst)[0], True)
- # Only two required question with hidden shown and answered
- create_response(user, 'want_other_property_claims', '["Ask for other property claims"]')
+ # All required question with hidden shown but no response
+ UserResponse.objects.filter(question_id='deal_with_property_debt').update(value="Unequal division")
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
self.assertEqual(is_complete(step, lst)[0], False)
# All required question with hidden shown and answered
- create_response(user, 'other_property_claims', 'Want these property claims')
+ create_response(user, 'how_to_divide_property_debt', 'Do not divide them')
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
self.assertEqual(is_complete(step, lst)[0], True)
+ # Only two required question with hidden shown and answered
+ # NOTE: want_other_property_claims not in use anymore
+ # create_response(user, 'want_other_property_claims', '["Ask for other property claims"]')
+ #
+ # lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
+ # self.assertEqual(is_complete(step, lst)[0], False)
+
# Put empty response
- UserResponse.objects.filter(question_id='want_other_property_claims').update(value="")
+ UserResponse.objects.filter(question_id='other_property_claims').update(value="")
lst = UserResponse.objects.filter(question_id__in=questions).values('question_id', 'value', 'question__conditional_target', 'question__reveal_response', 'question__required')
- self.assertEqual(is_complete(step, lst)[0], True)
+ self.assertEqual(is_complete(step, lst)[0], False)
def test_other_orders(self):
step = 'other_orders'
diff --git a/edivorce/apps/core/utils/question_step_mapping.py b/edivorce/apps/core/utils/question_step_mapping.py
index 6fff397d..8708bbfe 100644
--- a/edivorce/apps/core/utils/question_step_mapping.py
+++ b/edivorce/apps/core/utils/question_step_mapping.py
@@ -18,7 +18,7 @@ question_step_mapping = {'prequalification': ['married_marriage_like', 'lived_in
'marital_status_before_spouse', 'when_were_you_live_married_like'],
'your_separation': ['no_reconciliation_possible', 'no_collusion',],
'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'],
'other_orders': ['other_orders_detail'],
'other_questions': ['address_to_send_official_document_street_you',
'address_to_send_official_document_city_you',
diff --git a/edivorce/fixtures/Question.json b/edivorce/fixtures/Question.json
index ce5c76c0..604b243a 100644
--- a/edivorce/fixtures/Question.json
+++ b/edivorce/fixtures/Question.json
@@ -532,9 +532,7 @@
"name": "Please list any other property claims.",
"description": "For step 7, Form 1 6. Property and debt",
"summary_order": 50,
- "required": "Conditional",
- "conditional_target": "want_other_property_claims",
- "reveal_response": "[\"Ask for other property claims\"]"
+ "required": "Required"
},
"model": "core.question",
"pk": "other_property_claims"