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

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

{% block progress %}
    {% if request.user.is_authenticated %}
        {% include "partials/progress.html" %}
    {% endif %}
{% endblock %}

{% block content %}

<div>
    <h1>Before We Begin...</h1>

    <p>Some divorces are more complicated than others, and not everyone should
    use this online tool. So let's start by asking you a few questions to make
    sure that this website is right for your situation.</p>
</div>

<div class="question-well">
    <h3>When did you and your spouse separate (legally this is referred to as
        <span class="tooltip-link" data-toggle="tooltip" data-placement="right"
              data-html="true"
              title="
                <p><b>Living separate and apart</b></p>
                <p>You or your spouse have decided to end the marriage. In
                general one separates by moving out.  However, it is possible
                to be separated but still live under the same roof as long as
                either you or your spouse have clearly communicated  your
                intention for a permanent separation (and are starting to act
                upon it).</p>
                <p>This could mean:</p>
                <ul>
                  <li>You're living in separate rooms</li>
                  <li>You're sleeping in separate beds</li>
                  <li>There's no sexual relationship</li>
                </ul>
              ">
           living separate and apart<i class="fa fa-question-circle" aria-hidden="true"></i></span>)?
    </h3>
    <p>
        <span class="input-group date date-picker-group">
            {% input_field type="text" name="separation_date" class="date-picker form-control" id="separated_date" placeholder="MMM D, YYYY" %}
            <span class="input-group-addon" >
                <i class="fa fa-calendar circle"></i>
            </span>
        </span>
    </p>

    <div class="information-message bg-danger" id="separation_date_alert" hidden>
        <p>
            The date you entered indicates you've been separated for less than
            one year. You can use this online tool to start working on the
            divorce forms, however, you will not be able to file your documents
            at the registry until the one year separation period has passed.
        </p>

        <p>Under the Divorce Act, a divorce may be granted on one of three grounds:</p>

        <ul>
            <li>intentional separation for more than one year</li>
            <li>adultery</li>
            <li>physical or mental cruelty</li>
        </ul>

        <p>
            Most divorces are granted on the basis of intentional separation
            for more than a year.  It's possible to get a divorce more quickly
            by basing it on the grounds of either adultery or physical or
            mental cruelty.  However, you must be able to prove the adultery or
            cruelty. It's best to talk to a lawyer before deciding to seek a
            divorce on grounds other than separation.
        </p>
    </div>

    <div class="collapse-trigger collapsed" data-toggle="collapse"
         aria-expanded="false" data-target="#collapse_determine_separation_date"
         aria-controls="collapse_determine_separation_date">
        <div>
            How do I determine the separation date?
        </div>
    </div>
    <div class="collapse" id="collapse_determine_separation_date">
        <div>
            <p>Separation starts when one spouse decides that things have come
            to an end/the relationship is over, and then acts on the
            decision.</p>

            <p>You might even still live in the same house to save money, but
            you're usually still considered separated if you don't share things
            like meals, a bedroom, and social activities.</p>
        </div>
    </div>

    <div class="collapse-trigger collapsed" data-toggle="collapse"
         aria-expanded="false" data-target="#collapse_exact_date"
         aria-controls="collapse_exact_date">
        <div>
            Can't remember exact date
        </div>
    </div>
    <div class="collapse" id="collapse_exact_date">
        <div>
            <p>If you cannot remember the exact date you separated then enter: </p>
            <ul>
                <li>
                    the last day of that month in which you decided to separate
                    from your spouse,
                </li>
                <li>the month, and;</li>
                <li>the year</li>
            </ul>
        </div>
    </div>
</div>

<div class="question-well">
    <h3>
      Did {% if name_you %}{{ name_you }}{% else %}you{% endif %}
      and {% if name_spouse %}{{ name_spouse }}{% else %}your spouse{% endif %}
      attempt to reconcile after you separated
      <span id="separation_date_span">{% if separation_date %} on {{ separation_date }}{% endif %}</span>?
    </h3>
    <div class="radio">
      <label>
        {% input_field type="radio" name="try_reconcile_after_separated" value="NO" data_target_id="reconciliation_period" data_reveal_target="false" %}
        No, {% if name_spouse %}{{ name_spouse }}{% else %}my spouse{% endif %}
        and I have not reconciled (gotten back together)
      </label>
    </div>
    <div class="radio">
      <label>
        {% input_field type="radio" name="try_reconcile_after_separated" value="YES" data_target_id="reconciliation_period" data_reveal_target="true" %}
        Yes, {% if name_spouse %}{{ name_spouse }}{% else %}my spouse{% endif %}
        and I lived together again during the following period(s) in an
        unsuccessful attempt to reconcile
      </label>
    </div>

    <div id="reconciliation_period" hidden>
        <div id="reconciliation_period_group" hidden>
            {% include "partials/reconciliation_period.html" %}
        </div>
        <div id="reconciliation_period_fields">
            {% if reconciliation_period and reconciliation_period != '[]' %}
                {% multiple_values_to_list source=reconciliation_period as periods %}
                {% for from, to in periods %}
                    {% include "partials/reconciliation_period.html" with from=from to=to %}
                {% endfor %}
            {% else %}
                {% include "partials/reconciliation_period.html" %}
            {% endif %}
        </div>
        <input type="button" id="btn_add_reconciliation_periods" class="btn btn-success" value="Add Period"/>
        <p>&nbsp;</p>
    </div>

    <div>
        <div class="information-message bg-danger" id="reconciliation_90_days_alert" hidden>
            <p>Based on the date(s) you have provided for reconciliation, we
            have detected that your reconciliation may be for a period of
            greater than 90 days. Within the one year separation period, you
            can only live  together for 90 days or less. </p>

            <p>You can still proceed to complete the application, however, it
            will be up to the court to decide if you have lived separate and
            apart for the required period of one year.</p>

            <p>You may want to <a href="{% url 'legal' %}" target="_blank">talk
              to a lawyer</a> regarding your legal rights and options. </p>
        </div>
    </div>

    <div class="collapse-trigger collapsed" data-toggle="collapse"
         aria-expanded="false" data-target="#collapse_reconcile_not_work"
         aria-controls="collapse_reconcile_not_work">
        <div>
            What happens if my spouse and I tried to get back together for a short time but it did not work out?
        </div>
    </div>
    <div class="collapse" id="collapse_reconcile_not_work">
        <div>
            <p>Spouses that are separated can get back together and live
            together again to try and make the marriage work, but within the
            one-year separation period they can only live together for a total
            of 90 days or less. If they live together for more than 90 days,
            the one-year period of separation starts all over again from the
            date of the last separation. For more information on separation,
            refer to “<a
            href="http://www.cbabc.org/For-the-Public/Dial-A-Law/Scripts/Family-Law/115"
            target="_blank">Separation and Separation Agreements</a>” from the
            Canadian Bar Association.</p>
        </div>
    </div>
</div>

{% endblock %}

{% block formbuttons %}
<div class="form-buttons clearfix">
    <a class="btn btn-primary" id="btn_reconcilaition_next" href="{% url 'prequalification' '02' %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
    <a class="btn btn-success pull-right" id="btn_reconcilaition_back" href="{% url 'prequalification' '04' %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
</div>
{% endblock %}

{% block sidebarText%}
<h3>Am I separated?</h3>

<p>When two people who have been living together in a marriage decide not to
live together any more, they are separated.</p>

<p>There is no such thing as a "legal" separation. If you are living apart, you
are separated.</p>

<p>It is possible to be separated and still living in the same home where a
clear intention of a permanent separation has been communicated and acted
upon.</p>

<h3>What happens if my spouse and I tried to work things out?</h3>
<p>
    If you apply for a divorce on the basis of a one-year separation, you can
    live together for up to 90 days (either before or after you file the
    application) to try to reconcile. If things do not work out, you can
    continue your action for divorce as if you had not spent the time together.
</p>

<h3>Does being separated mean living at two different addresses?</h3>

<p>Some couples choose to separate but still live in the same house. A lawyer can tell you what factors courts may consider when they are deciding if you are separated.</p>

<p>A <a
  href="http://www.familylaw.lss.bc.ca/resources/fact_sheets/howToProveYouAreSeparatedIfYouStillLiveTogether.php"
  target="_blank">list of activities and behaviours</a> that the courts
consider to be indicators of a couple being separated can be found on the
Family Law in B.C. website.</p>
{% endblock %}
