{% extends 'base.html' %}
{% load input_field %}
{% load step_order %}
{% load load_json %}

{% block title %}{{ block.super }}: Review{% endblock %}

{% block progress %}{% include "partials/progress.html" %}{% endblock %}

{% block content %}
<h1><small>Step {% step_order step="review" %}:</small>Review Your Answers</h1>
<p>
    Please review the answers you have provided. If any changes need to be made click the green "Edit" button which will
    take you back to the section in which a given question was posed.
</p>
<p>
    If all of your answers look accurate and complete then proceed to the next step -
    <a href="{% url 'dashboard_nav' 'print_form' %}">Review and Print your Divorce Forms</a>.
</p>
<div class="question-well step-review">
    <div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_prequal" aria-controls="collapse_changed_name">
    	<div>
    		Qualifying Questions
    	</div>
    </div>
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'prequalification' '01' %}">Edit</a> </p>
    <div class="clearfix"> </div>
    <div class="collapse in" id="review_step_prequal">
    	<div>
    		{% include "partials/review_user_responses.html" with questions=prequalification step='prequalification' %}
    	</div>
    </div>
</div>
<div class="question-well step-review {% if step_status.which_orders != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_1" aria-controls="collapse_changed_name">
		<div>
			Step 1: What are you asking for
        </div>
    </div>
    {% if step_status.which_orders != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'orders' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_1">
		<div>
			{% include "partials/review_user_responses.html" with questions=which_orders %}
		</div>
	</div>
</div>

<div class="question-well step-review {% if step_status.your_information != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_2" aria-controls="collapse_changed_name">
		<div>
			Step 2: Your information
        </div>
	</div>
    {% if step_status.your_information != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
	<p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'claimant' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_2">
		<div>
			{% include "partials/review_user_responses.html" with questions=your_information step='your_information' %}
		</div>
	</div>
</div>

<div class="question-well step-review {% if step_status.your_spouse != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_3" aria-controls="collapse_changed_name">
		<div>
			Step 3: Your spouse
		</div>
	</div>
    {% if step_status.your_spouse != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'respondent' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_3">
		<div>
			{% include "partials/review_user_responses.html" with questions=your_spouse step='your_spouse' %}
		</div>
	</div>
</div>

<div class="question-well step-review {% if step_status.your_marriage != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_4" aria-controls="collapse_changed_name">
		<div>
			Step 4: Your marriage
		</div>
	</div>
    {% if step_status.your_marriage != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'marriage' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_4">
		<div>
			{% include "partials/review_user_responses.html" with questions=your_marriage step='your_marriage' %}
		</div>
	</div>
</div>

<div class="question-well step-review {% if step_status.your_separation != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_5" aria-controls="collapse_changed_name">
		<div>
			Step 5: Your separation
		</div>
	</div>
    {% if step_status.your_separation != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'separation' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_5">
		<div>
			{% include "partials/review_user_responses.html" with questions=your_separation %}
		</div>
	</div>
</div>

{% if derived.has_children_of_marriage %}
<div class="question-well step-review {% if step_status.your_children != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_6" aria-controls="collapse_changed_name">
		<div>
			Step {% step_order step="children" %}: Your children
		</div>
	</div>
    {% if step_status.your_children != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'children' 'your_children' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_6">
		<div>
			{% include "partials/review_user_responses.html" with questions=your_children step='your_children' %}
		</div>
	</div>
</div>
{% endif %}

{% if derived.wants_spousal_support %}
<div class="question-well step-review {% if step_status.spousal_support != 'Completed' %}error{% endif %}">
	<div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_7" aria-controls="collapse_changed_name">
		<div>
			Step {% step_order step="support" %}: Spousal support
		</div>
	</div>
    {% if step_status.spousal_support != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'support' %}">Edit</a> </p>
    <div class="clearfix"> </div>
	<div class="collapse in" id="review_step_7">
		<div>
			{% include "partials/review_user_responses.html" with questions=spousal_support %}
		</div>
	</div>
</div>
{% endif %}

{% if derived.wants_property_division %}
<div class="question-well step-review {% if step_status.property_and_debt != 'Completed' %}error{% endif %}">
    <div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_8" aria-controls="collapse_changed_name">
    	<div>
    		Step {% step_order step="property" %}: Property and debt
    	</div>
    </div>
    {% if step_status.property_and_debt != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'property' %}">Edit</a> </p>
    <div class="clearfix"> </div>
    <div class="collapse in" id="review_step_8">
    	<div>
    		{% include "partials/review_user_responses.html" with questions=property_and_debt step='property_and_debt' %}
    	</div>
    </div>
</div>
{% endif %}

{% if derived.wants_other_orders %}
<div class="question-well step-review {% if step_status.other_orders != 'Completed' %}error{% endif %}">
    <div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_9" aria-controls="collapse_changed_name">
    	<div>
    		Step {% step_order step="other_orders" %}: Other orders
    	</div>
    </div>
    {% if step_status.other_orders != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'other_orders' %}">Edit</a> </p>
    <div class="clearfix"> </div>
    <div class="collapse in" id="review_step_9">
    	<div>
    		{% include "partials/review_user_responses.html" with questions=other_orders %}
    	</div>
    </div>
</div>
{% endif %}

<div class="question-well step-review {% if step_status.other_questions != 'Completed' %}error{% endif %}">
    <div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_10" aria-controls="collapse_changed_name">
    	<div>
    		Step {% step_order step="other_questions" %}: Other questions
    	</div>
    </div>
    {% if step_status.other_questions != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'other_questions' %}">Edit</a> </p>
    <div class="clearfix"> </div>
    <div class="collapse in" id="review_step_10">
    	<div>
    		{% include "partials/review_user_responses.html" with questions=other_questions step="other_questions" %}
    	</div>
    </div>
</div>

<div class="question-well step-review {% if step_status.filing_locations != 'Completed' %}error{% endif %}">
    <div class="collapse-trigger" data-toggle="collapse" aria-expanded="true" data-target="#review_step_11" aria-controls="collapse_changed_name">
    	<div>
    		Step {% step_order step="location" %}: Filing location
    	</div>
    </div>
    {% if step_status.filing_locations != 'Completed' %}{% include 'partials/incomplete.html' %}{% endif %}
    <p class="review-buttons"><a class="btn btn-success" href="{% url 'question_steps' 'location' %}">Edit</a> </p>
    <div class="clearfix"> </div>
    <div class="collapse in" id="review_step_11">
    	<div>
    		{% include "partials/review_user_responses.html" with questions=filing_locations %}
    	</div>
    </div>
</div>
{% if derived.any_errors %}
    <div class="review-warning">
        <div><span class="exclamation"><i class="fa fa-fw fa-exclamation-circle"></i></span></div>
        <div>
            You have not completed at least one field that is required to create your forms.
            Missing required fields are noted on this screen in the
            following way: <span class="warning">MISSING REQUIRED FIELD</span>
            Forms which are missing fields will be identified with the following symbol:
            <span class="progress-status"><i class="fa fa-adjust" aria-hidden="true"></i></span>
            Please ensure that all required fields are
            completed and then return to this page.
        </div>
    </div>
{% endif %}

<div id="questions_modal" class="modal in" tabindex="-1" role="dialog" style="display: block">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <i class="fa fa-file" aria-hidden="true"></i>
                <h1 class="modal-title">Review your answers</h1>
            </div>
            <div class="modal-body">
                <p>Congratulations, you're almost done. You've answered all the questions which will allow us to produce your divorce documents. Before we do this, please review the answers you provided for accuracy and make any required changes.</p>
            </div>
            <div class="modal-footer">
                <a type="button" class="btn btn-primary btn-lg" data-dismiss="modal">Continue</a>
            </div>
        </div>
    </div>
</div>
<div class="modal-backgrop in"></div>

{% endblock %}

{% block formBack %}{% prev_step step='review' %}{% endblock %}
{% block formNext %}{% url 'dashboard_nav' 'sign_file_options' %}{% endblock %}
{% block nextButtonAttribute %}{% if derived.any_errors %}disabled{% endif %}{% endblock %}

{% block sidebarNav %}
<!-- no sidebar -->
{% endblock %}

{% block sidebar %}
<!-- no sidebar -->
{% endblock %}
