{% 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>Do you or your spouse live in B.C.?</h3>

    <div class="btn-radio-group" data-toggle="buttons">
        <label class="btn btn-radio">
            {% input_field type="radio" name="lived_in_bc" autocomplete="off" value="YES" data_target_id="cannot_divorce_in_bc" data_reveal_target="false" data_target_class="not-disqualified" data_reveal_class="true" %} Yes
        </label>

        <label class="btn btn-radio">
            {% input_field type="radio" name="lived_in_bc" autocomplete="off" value="NO" data_target_id="cannot_divorce_in_bc" data_reveal_target="true" data_target_class="not-disqualified" data_reveal_class="false" %} No
        </label>
    </div>

    <div class="information-message bg-danger hard-stop" id="cannot_divorce_in_bc" hidden>
        <p>You must apply for divorce in the Canadian province or territory in
            which you've lived for a full year immediately before making your
            application.</p>
        <p>To find out how to apply for a divorce in your province or territory
        refer to the appropriate
        <a href="http://www.justice.gc.ca/eng/fl-df/pt-tp/index.html"
        target="_blank">Provincial or Territorial Government website</a>.</p>
    </div>

    <div class="not-disqualified">
        <div class="collapse-trigger collapsed" data-toggle="collapse"
             aria-expanded="false" data-target="#collapse_living_in_bc"
             aria-controls="collapse_living_in_bc">
            <div>
                I've been living in B.C. for many years, but my spouse lives
                outside of B.C. Can we still get divorced in B.C.?
            </div>
        </div>
        <div class="collapse" id="collapse_living_in_bc">
            <div>
                <p>Yes. If you've been living in B.C. for at least one year and
                continue to live in B.C., you can apply for divorce in BC
                Supreme Court. The Canada Divorce Act states that a supreme
                court can deal with divorce proceedings when either spouse has
                been living in the province for at least one year immediately
                before applying.</p>
            </div>
        </div>
    </div>
</div>

<div class="question-well not-disqualified">
    <h3>Have you or your spouse lived in B.C. at least one year prior to
      starting your divorce?</h3>

    <div class="btn-radio-group" data-toggle="buttons">
        <label class="btn btn-radio">
            {% input_field type="radio"  name="lived_in_bc_at_least_year" autocomplete="off" value="YES" data_target_id="divorce_precondition" data_reveal_target="false" %} Yes
        </label>

        <label class="btn btn-radio">
            {% input_field type="radio"  name="lived_in_bc_at_least_year" autocomplete="off" value="NO" data_target_id="divorce_precondition" data_reveal_target="true" %} No
        </label>
    </div>

    <p>In order to apply for a divorce in B.C., you or your spouse must have
    been a regular resident in B.C (the legal term is
        <span class="tooltip-link"
              data-toggle="tooltip" data-placement="right" data-html="true"
              title="
                <b>Ordinarily resident</b>
                <br /><br />
                Ordinarily Resident
                <ul>
                  <li>the place where a person resides in the ordinary course
                  of his or her day to day</li>
                  <li>you do not lose your ordinary resident in a place when
                  you leave for a temporary purpose (e.g. go to school in
                  another province)</li>
                </ul><br/>
                Not an Ordinarily Resident
                <ul>
                  <li>If you have travelled to another place to live and work
                  indefinitely (even though you ultimately intend to return to
                  the prior home)</li>
                </ul>
                <p>A detailed explanation of the
                  <a href='http://www.justice.gc.ca/eng/rp-pr/fl-lf/divorce/rhro_cl/p4.html'
                    target='_blank'>meaning of ordinarily resident</a> can be
                  found on the Department of Justice website.</p>
                ">
            ordinarily resident<i class="fa fa-question-circle" aria-hidden="true"></i>
        </span>) for at least one year immediately before starting the proceeding.
    </p>

    <div class="information-message bg-danger" id="divorce_precondition" hidden>
        <p>Before you can apply for divorce in B.C. it is required that you or
        your spouse has lived in B.C (ordinarily resident) for the last year.
        You can use this Online Divorce Assistant but you will not be able to
        submit your divorce application to the registry until you or your
        spouse has lived in the province for one year.</p>

        <p>Another option is to see if you are eligible to apply for divorce in
        the province / territory that you have most recently lived in prior to
        moving to B.C. More information on
        <a href="http://www.justice.gc.ca/eng/fl-df/pt-tp/index.html"
        target="_blank">How to Apply for a Divorce in other provinces and
        territories</a> can be found on the Department of Justice website.</p>
    </div>
</div>
{% endblock %}

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

{% block sidebarText %}
<p><strong>Ordinarily Resident</strong></p>
<p>
  The legal definition of “ordinarily resident” is: the place where in the
  settled routine of an individual's life, he or she regularly, normally or
  customarily lives.  “Ordinarily” is the word is used in s. 3(1) of the
  Divorce Act…. A court in a province has jurisdiction to hear and determine a
  divorce proceeding if either spouse has been ordinarily resident in the
  province for at least one year immediately preceding the
  commencement of the proceeding.
</p>
<p>A detailed explanation of the
  <a href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/divorce/rhro_cl/p4.html"
  target="_blank"> meaning of ordinarily resident</a> can be found on the
  Department of Justice website.
</p>
{% endblock %}
