Browse Source

DIV-423 - Hide some questions when common-law

pull/160/head
Mike Olund 8 years ago
parent
commit
a9cd5f3b0f
5 changed files with 34 additions and 21 deletions
  1. +5
    -1
      edivorce/apps/core/templates/incomplete.html
  2. +1
    -1
      edivorce/apps/core/templates/prequalification/step_04.html
  3. +13
    -13
      edivorce/apps/core/templates/question/09_other_questions.html
  4. +6
    -2
      edivorce/apps/core/views/main.py
  5. +9
    -4
      edivorce/fixtures/Question.json

+ 5
- 1
edivorce/apps/core/templates/incomplete.html View File

@ -35,7 +35,11 @@
{% block formbuttons %} {% block formbuttons %}
<div class="form-buttons clearfix not-disqualified"> <div class="form-buttons clearfix not-disqualified">
<a class="btn btn-primary" href="{% url 'prequalification' '06' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
{% if married_marriage_like == "Living together in a marriage like relationship" %}
<a class="btn btn-primary" href="{% url 'prequalification' '04' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
{% else %}
<a class="btn btn-primary" href="{% url 'prequalification' '06' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
{% endif %}
</div> </div>
{% endblock %} {% endblock %}


+ 1
- 1
edivorce/apps/core/templates/prequalification/step_04.html View File

@ -79,7 +79,7 @@
<a class="btn btn-primary" href="{% url 'prequalification' '03' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a> <a class="btn btn-primary" href="{% url 'prequalification' '03' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
{% if married_marriage_like == "Living together in a marriage like relationship" %} {% if married_marriage_like == "Living together in a marriage like relationship" %}
<a class="btn btn-success pull-right" href="{% url 'prequalification' '06' %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
<a class="btn btn-success pull-right" href="{% url 'success' %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
{% else %} {% else %}
<a class="btn btn-success pull-right" href="{% url 'prequalification' '05' %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a> <a class="btn btn-success pull-right" href="{% url 'prequalification' '05' %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
{% endif %} {% endif %}


+ 13
- 13
edivorce/apps/core/templates/question/09_other_questions.html View File

@ -80,19 +80,19 @@
</div> </div>
</div> </div>
<div class="question-well">
<h2>Divorce is to take effect on:</h2>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="the 31st day after the date of this order" %}the 31st day after the date of this order</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="specific date" %}a specific date
<span class="input-group date date-picker-group" data-allow-future-date="true">
{% input_field type="text" name="divorce_take_effect_on_specific_date" id="effect_date" class="date-picker-future other-textbox input-inline form-control" tabindex="-1" placeholder="DD/MM/YYYY" %}
<span class="input-group-addon" ><i class="fa fa-calendar circle"></i></span>
</span>
</label></div>
<p>If you select the "specific date" option you will need to request this as an "other" order and you will need to provide affidavit evidence to support the order. </p>
</div>
{% if married_marriage_like == "Legally married" %}
<div class="question-well">
<h2>Divorce is to take effect on:</h2>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="the 31st day after the date of this order" %}the 31st day after the date of this order</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="specific date" %}a specific date
<span class="input-group date date-picker-group" data-allow-future-date="true">
{% input_field type="text" name="divorce_take_effect_on_specific_date" id="effect_date" class="date-picker-future other-textbox input-inline form-control" tabindex="-1" placeholder="DD/MM/YYYY" %}
<span class="input-group-addon" ><i class="fa fa-calendar circle"></i></span>
</span>
</label></div>
<p>If you select the "specific date" option you will need to request this as an "other" order and you will need to provide affidavit evidence to support the order. </p>
</div>
{% endif %}
{% endblock %} {% endblock %}


+ 6
- 2
edivorce/apps/core/views/main.py View File

@ -65,8 +65,12 @@ def incomplete(request):
""" """
prequal_responses = get_responses_from_session_grouped_by_steps(request)['prequalification'] prequal_responses = get_responses_from_session_grouped_by_steps(request)['prequalification']
complete, missed_questions = is_complete('prequalification', prequal_responses) complete, missed_questions = is_complete('prequalification', prequal_responses)
return render(request, 'incomplete.html',
context={'missed_questions': missed_questions, 'debug': settings.DEBUG })
responses_dict = get_responses_from_session(request)
responses_dict.append(('debug', settings.DEBUG, ))
responses_dict.append(('missed_questions', str(missed_questions), ))
return render(request, 'incomplete.html', context=responses_dict)
def register(request): def register(request):


+ 9
- 4
edivorce/fixtures/Question.json View File

@ -160,7 +160,9 @@
"name": "What is your reason (grounds) for asking for a divorce?", "name": "What is your reason (grounds) for asking for a divorce?",
"description": "For pre-qualification step 6", "description": "For pre-qualification step 6",
"summary_order": 15, "summary_order": 15,
"required": "Required"
"required": "Conditional",
"conditional_target": "married_marriage_like",
"reveal_response": "Legally married"
}, },
"model": "core.question", "model": "core.question",
"pk": "divorce_reason" "pk": "divorce_reason"
@ -708,8 +710,8 @@
"description": "For step 9, Form 52 This Court Orders that", "description": "For step 9, Form 52 This Court Orders that",
"summary_order": 68, "summary_order": 68,
"required": "Conditional", "required": "Conditional",
"conditional_target": "divorce_take_effect_on_specific_date",
"reveal_response": "specific date"
"conditional_target": "married_marriage_like",
"reveal_response": "Legally married"
}, },
"model": "core.question", "model": "core.question",
"pk": "divorce_take_effect_on" "pk": "divorce_take_effect_on"
@ -718,7 +720,10 @@
"fields": { "fields": {
"name": "Divorce is to take effect on specific date", "name": "Divorce is to take effect on specific date",
"description": "For step 9 - specific date, Form 52 This Court Orders that", "description": "For step 9 - specific date, Form 52 This Court Orders that",
"summary_order": 69
"summary_order": 69,
"required": "Conditional",
"conditional_target": "divorce_take_effect_on",
"reveal_response": "specific date"
}, },
"model": "core.question", "model": "core.question",
"pk": "divorce_take_effect_on_specific_date" "pk": "divorce_take_effect_on_specific_date"


Loading…
Cancel
Save