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

{% block title %}{{ block.super }}: Your Children {% endblock %}

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

{% block content %}
    <h1><small>Step {% step_order step="children" %}:</small>Children - Payor & Fact Sheets</h1>
    <div id="claimant_children" hidden>
        {{ claimant_children }}
    </div>
    {% if derived.show_fact_sheet_b %}
        {% include "partials/fact_sheets/fact_sheet_b.html" %}
    {% endif %}

    {% if derived.show_fact_sheet_c %}
        {% include "partials/fact_sheets/fact_sheet_c.html" %}
    {% endif %}

    <div class="question-well {% if child_support_payor_error %}error{% endif %}" id="who_is_payor">
        {% money_input_field name="annual_gross_income" hidden="true" %}
        {% money_input_field name="spouse_annual_gross_income" hidden="true" %}
        <span id="__name_you" hidden>{% you_name if_blank="You" %}</span>
        <span id="__name_spouse" hidden>{% spouse_name if_blank="Your spouse" %}</span>

        <h3>Who is the
            <span class="tooltip-link"
                  data-toggle="tooltip" data-placement="right" data-html="true"
                  title="
                    <b>Payor</b>
                    <p>The person who pays child support.</p>
                    ">
                    payor<i class="fa fa-question-circle" aria-hidden="true"></i>
                </span>
            ?
            {% if child_support_payor_error %}{% include 'partials/required.html' %}{% endif %}
        </h3>
        {% if derived.show_fact_sheet_b %}
        <p>
            If the total in the <b>Fact Sheet(s)</b> is <b>zero dollars ($0.00)</b>, select 'Both' are the payor below.
        </p>
        {% endif %}
        <p>
            Please select one
        </p>

        {% if derived.show_fact_sheet_b or derived.show_fact_sheet_c %}
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="Myself (Claimant 1)" disabled="" %} {% you_name if_blank="Myself" %} (Claimant 1)
                </label>
            </div>
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="My Spouse (Claimant 2)" disabled="" %} {% spouse_name if_blank="My spouse" %} (Claimant 2)
                </label>
            </div>
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="Both myself and my spouse" disabled="" %} Both {% you_name if_blank="myself" %} and {% spouse_name if_blank="my spouse" %}
                </label>
            </div>
        {% else %}
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="Myself (Claimant 1)" %} {% you_name if_blank="Myself" %} (Claimant 1)
                </label>
            </div>
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="My Spouse (Claimant 2)" %} {% spouse_name if_blank="My spouse" %} (Claimant 2)
                </label>
            </div>
            <div class="radio">
                <label>
                    {% input_field type="radio" name="child_support_payor" autocomplete="off" value="Both myself and my spouse" %} Both {% you_name if_blank="myself" %} and {% spouse_name if_blank="my spouse" %}
                </label>
            </div>
        {% endif %}

        <div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false" data-target="#collapse_determine_payor" aria-controls="collapse_determine_payor">
            <div>
                How do I determine who is the payor?
            </div>
        </div>
        <div class="collapse" id="collapse_determine_payor">
            <div>
                <p>
                    Who the payor is depends on:
                </p>
                <ul>
                    <li>The type of parenting arrangements for the child or children, such as shared custody or split custody.</li>
                    <li>The income of the parents.</li>
                </ul>
                <p>
                    It may also be affected by other factors such as:
                </p>
                <ul>
                    <li>Special and extraordinary expenses, like childcare that aren’t covered in the table amount.</li>
                    <li>Undue hardship that make it hard for the payor parent to pay child support.</li>
                    <li>Children over the age of majority who the payor still has a legal obligation to support.</li>
                </ul>
                <p>
                    If one parent takes care of the child/children most of the time, the other parent would normally be the payor.
                </p>
                <p>
                    If the child/children spends an equal amount of time in the care of each of you, or if both parents
                    are splitting custody of multiple children, the payor is likely the parent with the higher income.
                </p>
            </div>
        </div>
    </div>

    {% if derived.show_fact_sheet_d %}
        {% include "partials/fact_sheets/fact_sheet_d.html" %}
    {% endif %}

    {% if derived.show_fact_sheet_f %}
        {% include "partials/fact_sheets/fact_sheet_f.html" %}
    {% endif %}

    {% include "partials/fact_sheets/fact_sheet_e.html" %}
{% endblock %}


{% block formBack %}{% prev_step step='children' sub_step='facts' %}{% endblock %}
{% block formNext %}{% next_step step='children' sub_step='facts' %}{% endblock %}

{% block sidebarText %}
    <p><strong>The Federal Child Support Guidelines</strong></p>
    <p><a href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/toc-tdm.html" target="_blank">Step-by-Step guide</a></p>

    <div id="fact_sheet_e_sidebar">
        <p><strong>What is "undue hardship"?</strong></p>
        <p>
            The person paying or the person receiving child support can ask for a different amount than what's listed in
            the guidelines tables if that amount would cause them undue hardship. The payor may experience undue
            hardship trying to pay the child support, or the recipient may experience undue hardship trying to support
            the child or children with the amount given. The courts have said that "undue" means excessive, exceptional,
            or disproportionate. This can be a hard thing to prove. The person making the claim must report all income
            coming into their household, including any income or contribution from a new spouse or partner. This includes
            any contribution to household expenses, and any rental income, dividend income, investment income, and
            business income. If the payor makes this claim, the recipient must also provide information about their income.
        </p>
        <p><strong>How to determine undue hardship</strong></p>
        <p>
            To determine undue hardship under the Federal Child Support Guidelines, you need to compare the standards of
            living in both households. To do this, you need to:
        </p>
        <ul>
            <li>
                calculate the income of every member of both households; adjust each person’s income according to the
                rules set out in the Federal Guidelines; and
            </li>
            <li>
                calculate the household income ratio.
            </li>
        </ul>
        <p>
            The Federal Child Support Guidelines Step-by-Step Guide has a
            <a href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/w3a-f3a.html#s3" target="_blank">worksheet</a> to help you with the calculation to
            figure out whether there is undue hardship in your situation.
        </p>
        <p>Source: <a href="http://www.justice.gc.ca/eng/rp-pr/fl-lf/child-enfant/guide/start-com.html#h11" target="_blank">
            Federal Child Support Guidelines</a>, Department of Justice </p>
    </div>
{% endblock %}
