{% 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 and your spouse have any children (includes step children, adopted
  children)? The legal term is children of the marriage.</h3>

<div class="btn-radio-group" data-toggle="buttons">
    <label class="btn btn-radio">
        {% input_field type="radio"  name="children_of_marriage" autocomplete="off" value="YES" data_target_id="has_children" data_reveal_class="true" data_target_class="has_children_message" data_reveal_target="true" %} Yes
    </label>

    <label class="btn btn-radio">
        {% input_field type="radio"  name="children_of_marriage" autocomplete="off" value="NO" data_target_id="has_children" data_reveal_class="false" data_target_class="has_children_message" data_reveal_target="false" %} No
    </label>
</div>

<p>Legally, the court is only concerned with
    <span class="tooltip-link" data-toggle="tooltip" data-placement="right"
          data-html="true"
          title='
            <p><b>Children for the Marriage</b></p>
            <p>The <a href="http://wiki.clicklaw.bc.ca/index.php?title=Divorce
            Act" target="_blank">Divorce Act</a> defines child of the  marriage
            as:</p>
            <p>Child of the marriage means a child of two spouses or former
            spouses who, at the material time,</p>
            <ol type="a">
              <li>is under the age of majority and who has not withdrawn from
              their charge, or</li>
              <li>is the age of majority or over and under their charge but
              unable, by reason of illness, disability or other cause, to
              withdraw from their charge or to obtain the necessaries of life;
              (enfant à charge)?</li>
            </ol>
            <p>More details on the <a
            href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step2-etap2.html"
            target="_blank">definition of "child of the marriage"</a> can be
            found on the Department of Justice website.</p>
          '>children of the marriage<i class="fa fa-question-circle" aria-hidden="true"></i></span>.
    If you had children with your spouse, but the children are over
    the age of majority (19 in B.C.) and independent, they are
    no longer considered ‘children of the marriage’ under the Divorce
    Act, and you do not need to include their information in your
    divorce documents. Or, if you wish, you can name them in your
    documents, and indicate that they are 19 or over and independent,
    and no longer requiring support.</p>
    <div class="collapse-trigger collapsed" data-toggle="collapse"
                 aria-expanded="false" data-target="#collapse_rights_responsibilities_step_parent"
                 aria-controls="collapse_rights_responsibilities_step_parent">
        <div>
            What are the rights and responsibilities of a step parent?
        </div>
    </div>
    <div class="collapse" id="collapse_rights_responsibilities_step_parent">
        <div>
            <p>You’re a step-parent and may be responsible to pay child support if:</p>
            <ul>
                <li>
                    you and the child’s parent are or were married or lived common-law for at least two years,
                    and
                </li>
                <li>you also lived with the child.</li>
            </ul>
            <p>
                A step-parent does not automatically become a guardian. You may apply for guardianship
                of your step-children after you separate.
            </p>
            <p>
                You may have to pay child support for step-children if:
            </p>
            <ul>
                <li>
                    you contributed to the child’s support for at least one year during your relationship
                    with the child’s parent, and
                </li>
                <li>
                    the child support application is made within a year of the last time you contributed.
                </li>
            </ul>
            <p>
                A step-parent’s responsibility to pay child support comes after the child’s parents’
                or other guardians’ responsibility. When deciding if a step-parent should pay child support,
                the court will consider:
            </p>
            <ul>
                <li>the child’s standard of living when he or she lived with the step-parent, and</li>
                <li>how long they lived together</li>
            </ul>
        </div>
    </div>
    <div class="collapse-trigger collapsed" data-toggle="collapse"
         aria-expanded="false" data-target="#collapse_rights_responsibilities_adoptive_parent"
         aria-controls="collapse_rights_responsibilities_adoptive_parent">
        <div>
            What are the rights and responsibilities of an adoptive parent?
        </div>
    </div>
    <div class="collapse" id="collapse_rights_responsibilities_adoptive_parent">
        <div>
            <p>
                As an adoptive parent, you have the same responsibilities as any other parent
                for child support. You can also apply to share parenting responsibilities and
                parenting time if you separate. After a child is adopted, the parents who placed
                the child for adoption have no legal rights or responsibilities for that child.
            </p>
        </div>
    </div>
</div>

<div id="has_children" hidden>
    <div class="reveal question-well">
        <h3>How many children are under the age of 19?</h3>

        {% input_field type="number" name="number_children_under_19"  value="0" min="0" data_target_id="number_children_under_19" %}
    </div>

    <div class="reveal question-well">
        <h3>How many children are 19 years or older?</h3>

        {% input_field type="number" name="number_children_over_19" value="0" min="0" data_target_id="number_children_over_19" data_related_id="financial_support" data_target_class="not-disqualified-age" data_reveal_class="true" data_reveal_condition=">0" %}
    </div>

    <div class="reveal question-well" id="financial_support" hidden>
        <h3>Are you financially supporting any of the children that are 19
          years or older?</h3>
        <p>Please check all that apply.</p>
        <div class="checkbox-group">
            <div class="checkbox"><label>{% input_field type="checkbox" name="children_financial_support" value="NO" data_checkbox_radio="true" data_checkbox_radio_state_set="false" data_target_id="need_support" data_reveal_target="false" data_target_class="not-disqualified-other" data_reveal_class="true" %}No</label></div>
            <div class="checkbox"><label>{% input_field type="checkbox" name="children_financial_support" value="Yes, attending post secondary institution" data_checkbox_radio="true" data_checkbox_radio_state_set="true" %}Yes, attending post secondary institution</label></div>
            <div class="checkbox"><label>{% input_field type="checkbox" name="children_financial_support" value="Yes, due to disability" data_checkbox_radio="true" data_checkbox_radio_state_set="true" %}Yes, due to disability</label></div>
            <div class="checkbox"><label>{% input_field type="checkbox" name="children_financial_support" value="Yes, due to illness"  data_checkbox_radio="true" data_checkbox_radio_state_set="true"%}Yes, due to illness</label></div>
            <div class="checkbox"><label>{% input_field type="checkbox" name="children_financial_support" value="Yes, other reason"  data_checkbox_radio="true" data_checkbox_radio_state_set="true" %}Yes, other reason(s)</label></div>
        </div>
        <div class="collapse-trigger collapsed" data-toggle="collapse"
         aria-expanded="false" data-target="#collapse_circumstances_change_child_support"
         aria-controls="collapse_circumstances_change_child_support">
            <div>
                What if circumstances change and child support is either required, or not required, for any
                children over 19 years of age?
            </div>
        </div>
        <div class="collapse" id="collapse_circumstances_change_child_support">
            <div>
                <p>
                    If you have a child support agreement, you can change it at any time if both of you agree.
                </p>
                <p>
                    If the other party doesn’t agree with a change you want to make, you can apply to court
                    to set aside all or part of the agreement. The court would then replace it with a court
                    order. The court may set aside your agreement if it’s different from what the court would
                    have ordered under the law.
                </p>
                <p>
                    If you have a court order, either party can apply to lower or raise child support payments
                    if there’s a change in circumstances, such as:
                </p>
                <ul>
                    <li>a long-term income change for the payor,</li>
                    <li>a change to the child’s special or extraordinary expenses, or</li>
                    <li>a change in parenting arrangements or contact.</li>
                </ul>
                <p>
                    The court can also change the order if:
                </p>
                <ul>
                    <li>circumstances have changed so much that a court would make a different order now,</li>
                    <li>one party didn’t provide all the required financial information when the order was made, or</li>
                    <li>there’s important new information that wasn’t available when the first order was made.</li>
                </ul>
                <p>
                    If you have taken over responsibility for the daily care of a child from the other parent
                    or guardian, you can apply to change the child support order or agreement so the other parent
                    or guardian pays you child support.
                </p>
            </div>
        </div>
        <div class="information-message bg-danger hard-stop" id="need_support" hidden>
            <p>Sorry, but at this point in time you will not be able to
            complete your application for divorce using this online tool.
            Currently the tool supports a limited number of scenarios. In the
            meantime, you can file for divorce using the forms provided on the
            <a href="http://www2.gov.bc.ca/gov/content/justice/courthouse-services/documents-forms-records/court-forms/sup-family-forms"
            target="_blank">Supreme Court of B.C. website</a>.</p>

            <p>A
              <a href="http://www.familylaw.lss.bc.ca/guides/divorce/divJoint_courtForms.php"
              target="_blank">listing of forms</a> that may be required for a
              Joint Divorce can also be found on the Family Law in B.C. website.
            </p>
        </div>
    </div>
</div>
{% endblock %}

{% block formbuttons %}
<div class="form-buttons clearfix  not-disqualified-other">
    <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" %}
        <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 %}
        <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 %}

</div>
{% endblock %}

{% block sidebarText%}
<h3>Sample Scenario - Which children are "children of the marriage"</h3>
    <p>Louis and Jocelyn have four children:</p>
    <ul>
        <li>Sam is 16.</li>
        <li>Tom is 14.</li>
        <li>The twins, Theo and Camille, are 20.</li>
    </ul>
    <p>
        Louis and Jocelyn are divorcing. They have established that the Federal Guidelines apply to
        their situation. They now need to determine which of their children are
        “children of the marriage” —that is, which ones are dependent and need their financial support.
    </p>
    <p>
        Tom and Sam are both under the age of majority and are still dependent. Louis and Jocelyn
        have an obligation to support them.
    </p>
    <p>
        Theo is married and working full-time. He is independent and is not entitled to support.
    </p>
    <p>
        Camille is pursuing post-secondary education full-time in another province. She lives on
        campus, and both Louis and Jocelyn have been paying her tuition and living expenses.
        Louis and Jocelyn agree that she still depends on them and that they will continue to
        support her financially after the divorce until she graduates.
    </p>
    <p>
        Example Scenario from: <a href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/step2-etap2.html#h4" target="_blank">Federal Child Support Guidelines</a>,
        Department of Justice (3)
    </p>
{% endblock %}
