From fdf0ec76701e3591df8f1fd7854343b7e5ccc394 Mon Sep 17 00:00:00 2001 From: Charles Shin Date: Mon, 6 Mar 2017 15:06:53 -0800 Subject: [PATCH] Updated indicator to hightlight current step --- edivorce/apps/core/templates/pdf/form1.html | 2 +- edivorce/apps/core/templates/progress.html | 22 +++++++++---------- .../core/templates/question/01_orders.html | 2 +- .../core/templates/question/02_claimant.html | 2 +- .../templates/question/03_respondent.html | 2 +- .../core/templates/question/04_marriage.html | 2 +- .../templates/question/05_separation.html | 2 +- .../core/templates/question/06_support.html | 2 +- .../core/templates/question/07_property.html | 2 +- .../templates/question/08_other_orders.html | 4 +++- .../question/09_other_questions.html | 2 +- .../core/templates/question/10_location.html | 2 +- .../core/templates/question/11_review.html | 2 +- edivorce/apps/core/views/main.py | 1 + edivorce/fixtures/Question.json | 8 +++++++ 15 files changed, 34 insertions(+), 23 deletions(-) diff --git a/edivorce/apps/core/templates/pdf/form1.html b/edivorce/apps/core/templates/pdf/form1.html index fb51fbd4..a7538d82 100644 --- a/edivorce/apps/core/templates/pdf/form1.html +++ b/edivorce/apps/core/templates/pdf/form1.html @@ -324,7 +324,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:   + Claimant 1 and Claimant 2 are asking for an order in the following terms: {% if responses.other_orders_detail %} {{ responses.other_orders_detail }} {% else %}   {% endif %}

[set out terms of proposed order]

diff --git a/edivorce/apps/core/templates/progress.html b/edivorce/apps/core/templates/progress.html index c28827d8..e2690fb8 100644 --- a/edivorce/apps/core/templates/progress.html +++ b/edivorce/apps/core/templates/progress.html @@ -6,57 +6,57 @@ Qualifying Questions - + Step 1
What Are You Asking For?
{% if which_orders == 'Started' %} {% endif %}
- + Step 2
Your information
{% if your_information == 'Started' %} {% endif %}
- + Step 3
Your spouse
{% if your_spouse == 'Started' %} {% endif %}
- + Step 4
Your marriage
{% if your_marriage == 'Started' %} {% endif %}
- + Step 5
Your separation
{% if your_separation == 'Started' %} {% endif %}
- + Step 6
Spousal support
{% if spousal_support == 'Started' %} {% endif %}
- + Step 7
Property and debt
{% if property_and_debt == 'Started' %} {% endif %}
- + Step 8
Other orders
{% if other_orders == 'Started' %} {% endif %}
- + Step 9
Other questions
{% if other_questions == 'Started' %} {% endif %}
- + Step 10
Filing locations
{% if filing_locations == 'Started' %} {% endif %}
- + Step 11
Review
diff --git a/edivorce/apps/core/templates/question/01_orders.html b/edivorce/apps/core/templates/question/01_orders.html index b31b48dc..7998d144 100644 --- a/edivorce/apps/core/templates/question/01_orders.html +++ b/edivorce/apps/core/templates/question/01_orders.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Prequalification{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/02_claimant.html b/edivorce/apps/core/templates/question/02_claimant.html index 46115c61..84d308c1 100644 --- a/edivorce/apps/core/templates/question/02_claimant.html +++ b/edivorce/apps/core/templates/question/02_claimant.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Your Information{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/03_respondent.html b/edivorce/apps/core/templates/question/03_respondent.html index 2560ed63..c98de39b 100644 --- a/edivorce/apps/core/templates/question/03_respondent.html +++ b/edivorce/apps/core/templates/question/03_respondent.html @@ -2,7 +2,7 @@ {% block title %}{{ block.super }}: Your Spouse{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/04_marriage.html b/edivorce/apps/core/templates/question/04_marriage.html index 316645c0..1f9c11aa 100644 --- a/edivorce/apps/core/templates/question/04_marriage.html +++ b/edivorce/apps/core/templates/question/04_marriage.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Your Marriage{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/05_separation.html b/edivorce/apps/core/templates/question/05_separation.html index fb2eaf2c..d201e78b 100644 --- a/edivorce/apps/core/templates/question/05_separation.html +++ b/edivorce/apps/core/templates/question/05_separation.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Reason For Divorce{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/06_support.html b/edivorce/apps/core/templates/question/06_support.html index b91b9233..5a69339b 100644 --- a/edivorce/apps/core/templates/question/06_support.html +++ b/edivorce/apps/core/templates/question/06_support.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Declarations{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/07_property.html b/edivorce/apps/core/templates/question/07_property.html index 2b3a24ea..4da3adfb 100644 --- a/edivorce/apps/core/templates/question/07_property.html +++ b/edivorce/apps/core/templates/question/07_property.html @@ -2,7 +2,7 @@ {% load input_field %} {% block title %}{{ block.super }}: Application Location{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/08_other_orders.html b/edivorce/apps/core/templates/question/08_other_orders.html index 1c84651f..f71e42d4 100644 --- a/edivorce/apps/core/templates/question/08_other_orders.html +++ b/edivorce/apps/core/templates/question/08_other_orders.html @@ -2,12 +2,14 @@ {% block title %}{{ block.super }}: Other Orders{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %}

Step 8:Other Orders

+

Want other orders as follows:

+{% input_field type="textarea" name="other_orders_detail" rows="8" cols="65" class="response-textarea" %} {% endblock %} diff --git a/edivorce/apps/core/templates/question/09_other_questions.html b/edivorce/apps/core/templates/question/09_other_questions.html index 0230d74c..e6823be6 100644 --- a/edivorce/apps/core/templates/question/09_other_questions.html +++ b/edivorce/apps/core/templates/question/09_other_questions.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Spousal Support{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/10_location.html b/edivorce/apps/core/templates/question/10_location.html index 5cb70c9f..66e2ab11 100644 --- a/edivorce/apps/core/templates/question/10_location.html +++ b/edivorce/apps/core/templates/question/10_location.html @@ -3,7 +3,7 @@ {% block title %}{{ block.super }}: Property And Debts{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/templates/question/11_review.html b/edivorce/apps/core/templates/question/11_review.html index c0224346..d7066862 100644 --- a/edivorce/apps/core/templates/question/11_review.html +++ b/edivorce/apps/core/templates/question/11_review.html @@ -2,7 +2,7 @@ {% block title %}{{ block.super }}: Review{% endblock %} -{% block progress %}{% include "progress.html" %}{% endblock %} +{% block progress %}{% include "progress.html" with step=question_step %}{% endblock %} {% block content %} diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 314e26f7..b92075a7 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -79,6 +79,7 @@ def question(request, step): responses_dict = get_responses_from_db_grouped_by_steps(user) else: responses_dict = get_responses_from_db(user) + responses_dict['question_step'] = step # If page is filing location page, add registries dictionary for list of court registries if step == "10_location": responses_dict['registries'] = sorted(list_of_registries) diff --git a/edivorce/fixtures/Question.json b/edivorce/fixtures/Question.json index bb96db36..e64ab1bf 100644 --- a/edivorce/fixtures/Question.json +++ b/edivorce/fixtures/Question.json @@ -511,6 +511,14 @@ "model": "core.question", "pk": "address_to_send_official_document_email_spouse" }, +{ + "fields": { + "name": "Step 8 other orders", + "description": "DUMMY QUESTION for step 8 other orders" + }, + "model": "core.question", + "pk": "other_orders_detail" +}, { "fields": { "name": "Form 35 requisition dummy question",