{% load input_field %}
<div class="question-well {% if claiming_undue_hardship_error or derived.fact_sheet_e_error %}error{% endif %}">
    <h3>Are you or your spouse claiming undue hardship?{% if claiming_undue_hardship_error %}{% include 'partials/required.html' %}{% endif %}</h3>
    <p>
        The Child Support Guidelines tables contain the base amounts for child support. If you our your spouse feel
        that the child support amount will not leave enough money, you can claim that you will suffer
        <span class="tooltip-link"
              data-toggle="tooltip" data-placement="right" data-html="true"
              title="
                    <b>Undue hardship</b>
                    <p>
                        Circumstances that show the amount of child support under the child support guidelines is too
                        high or low. Must create &quot;undue&quot; (exceptional, excessive or disproportionate) difficulty
                        for the person making the claim.
                     </p>
                     <p>
                     A term used by the Child Support Guidelines to describe circumstances when payment of the table
                     amount of child support would cause financial difficulty for the payor or the recipient, potentially
                     justifying an award of support in an amount different than the table amount. See &quot;child support,&quot;
                     &quot;Child Support Guidelines&quot; and &quot;table amount.&quot;
                     </p>
                    ">
                    undue hardship<i class="fa fa-question-circle" aria-hidden="true"></i>.
            </span>
    </p>

    <div class="btn-radio-group" data-toggle="buttons">
        <label class="btn btn-radio">
            {% input_field type="radio" name="claiming_undue_hardship" autocomplete="off" value="YES" data_target_id="fact_sheet_e" data_reveal_target="true" %}
            YES
        </label>

        <label class="btn btn-radio">
            {% input_field type="radio" name="claiming_undue_hardship" autocomplete="off" value="NO" data_target_id="fact_sheet_e" data_reveal_target="false" %}
            NO
        </label>
    </div>

    <div class="collapse-trigger collapsed" data-toggle="collapse" aria-expanded="false"
         data-target="#collapse_undue_hardship_situations"
         aria-controls="collapse_undue_hardship_situations">
        <div>
            What situations are considered to be undue hardship?
        </div>
    </div>
    <div class="collapse" id="collapse_undue_hardship_situations">
        <div>
            <p>The types of situations that might result in undue hardship include:</p>
            <ul>
                <li>having an unusual or excessive amount of debt,</li>
                <li>having to make other support payments to children of another family (for example, from a previous marriage),</li>
                <li>having to support a disabled or ill person, and</li>
                <li>having to spend a lot of money to visit the child (for example, airfare to another city).</li>
            </ul>
        </div>
    </div>
    <div id="fact_sheet_e" class="question-well-border-less" hidden>
        <h1>Fact Sheet E Undue Hardship</h1>
        <p>
            Since you have previously indicated that you will be claiming undue hardship you will need to provide
            answers to the next set of questions. A claim for undue hardship can only be considered if the parent
            making the claim can show that their household’s standard of living is not higher than the standard of
            living in the household of the other parent. Often, income alone (which is all that is used to calculate
            the guideline amount) does not reflect other circumstances that may impact a households’ finances.
        </p>
        {% if derived.fact_sheet_e_error %}<p class="warning">At least one debt, expense, person, or other circumstance must be added in
            this area to claim Undue Hardship. You can turn off this requirement by selecting NO above for Undue Hardship.</p>{% endif %}
        <p><strong>Unusual or excessive debts</strong></p>
        <p>
            What are the unusual or excessive debts that you owe? These are debts that were taken on to support the family
            before you separated (e.g. student loans). The debt can also be due to earning a living (e.g. vehicle,
            specialized equipment).
        </p>
        <table id="claimant_debts" class="list-builder">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Debt name</th>
                <th class="table-bordered">What are the
                    <span class="tooltip-link"
                          data-toggle="tooltip" data-placement="right" data-html="true"
                          title="
                                    <b>Terms of this Debt</b>
                                    <p>For example, how much is owed, what is the rate of interest,
                                    when it must be repaid.</p>
                                    ">
                                terms of this debt<i class="fa fa-question-circle" aria-hidden="true"></i>
                            </span>?
                </th>
                <th class="table-bordered">Monthly amount</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="debt-group" hidden>
                {% include "partials/fact_sheet_excessive_debt.html" with debt_monthly_amount=0 %}
            </tr>
            {% multiple_values_to_list source=claimant_debts as debts %}
            {% for debt in debts %}
                <tr class="debt-item-row">
                    {% include "partials/fact_sheet_excessive_debt.html" with debt_name=debt.debt_name debt_terms=debt.debt_terms debt_monthly_amount=debt.debt_monthly_amount %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-debt fact-sheet-control" colspan="3" readonly>
                    <a href=""><i class="fa fa-plus btn-add-debt"></i> Add Debt</a>
                </td>
            </tr>
            </tbody>
        </table>

        <p><strong>Unusually high expenses for parenting time, contact with, or access to a child.</strong></p>
        <p>
            For example, airfare and accommodation to visit the child in another city.
        </p>
        <table id="claimant_expenses" class="list-builder">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Expense</th>
                <th class="table-bordered">Amount</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="expense-group" hidden>
                {% include "partials/fact_sheet_expense.html" with expense_amount=0 %}
            </tr>
            {% multiple_values_to_list source=claimant_expenses as expenses %}
            {% for expense in expenses %}
                <tr class="expense-item-row">
                    {% include "partials/fact_sheet_expense.html" with expense_name=expense.expense_name expense_amount=expense.expense_amount %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-expense fact-sheet-control" colspan="2" readonly>
                    <a href=""><i class="fa fa-plus btn-add-expense"></i> Add Expense</a>
                </td>
            </tr>
            </tbody>
        </table>

        <p><strong>Supporting another person</strong></p>
        <p>
            Legal duty to support any other person, such as a former spouse or a new spouse who is too ill or disabled to be able to support himself
            or herself.
        </p>
        <table id="supporting_non_dependents" class="list-builder">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Name of person</th>
                <th class="table-bordered">Relationship</th>
                <th class="table-bordered">Describe reason(s) for support</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="supporting-non-dependent-group" hidden>
                {% include "partials/fact_sheet_supporting_person.html" with name_field="non_dependent_name" relationship_field="non_dependent_relationship" reason_field="non_dependent_reason" input_field_class="supporting-non-dependent-input-field" save_selector=".supporting-non-dependent-input-field" delete_button_class="btn-delete-supporting-non-dependent" %}
            </tr>
            {% multiple_values_to_list source=supporting_non_dependents as non_dependents %}
            {% for non_dependent in non_dependents %}
                <tr class="supporting-non-dependent-item-row">
                    {% include "partials/fact_sheet_supporting_person.html" with name_field="non_dependent_name" relationship_field="non_dependent_relationship" reason_field="non_dependent_reason" input_field_class="supporting-non-dependent-input-field" save_selector=".supporting-non-dependent-input-field" delete_button_class="btn-delete-supporting-non-dependent" name=non_dependent.non_dependent_name relationship=non_dependent.non_dependent_relationship reason=non_dependent.non_dependent_reason %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-supporting-non-dependent fact-sheet-control" colspan="3" readonly>
                    <a href=""><i class="fa fa-plus btn-add-supporting-non-dependent"></i> Add Person</a>
                </td>
            </tr>
            </tbody>
        </table>

        <p><strong>Supporting dependent child/children from another relationship.</strong></p>
        <p>
            List the names of any other children for whom you have a legal duty to make support payments to.
            Do not include the names of any children for whom you are asking for support for as a part of this
            divorce application.
        </p>
        <table id="supporting_dependents" class="list-builder">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Child's name</th>
                <th class="table-bordered">Relationship</th>
                <th class="table-bordered">Describe reason(s) for support</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="supporting-dependent-group" hidden>
                {% include "partials/fact_sheet_supporting_person.html" with name_field="supporting_dependent_name" relationship_field="supporting_dependent_relationship" reason_field="supporting_dependent_reason" input_field_class="supporting-dependent-input-field" delete_button_class="btn-delete-supporting-dependent" save_selector=".supporting-dependent-input-field" %}
            </tr>
            {% multiple_values_to_list source=supporting_dependents as dependents %}
            {% for dependent in dependents %}
                <tr class="supporting-dependent-item-row">
                    {% include "partials/fact_sheet_supporting_person.html" with name_field="supporting_dependent_name" relationship_field="supporting_dependent_relationship" reason_field="supporting_dependent_reason" input_field_class="supporting-dependent-input-field" delete_button_class="btn-delete-supporting-dependent" save_selector=".supporting-dependent-input-field" name=dependent.supporting_dependent_name relationship=dependent.supporting_dependent_relationship reason=dependent.supporting_dependent_reason %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-supporting-dependent fact-sheet-control" colspan="3" readonly>
                    <a href=""><i class="fa fa-plus btn-add-supporting-dependent"></i> Add Person</a>
                </td>
            </tr>
            </tbody>
        </table>

        <p><strong>Support for a disabled or ill person.</strong></p>
        <table id="supporting_disabled" class="list-builder">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Name of person</th>
                <th class="table-bordered">Relationship</th>
                <th class="table-bordered">Describe reason(s) for support</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="supporting-disabled-group" hidden>
                {% include "partials/fact_sheet_supporting_person.html" with name_field="supporting_disabled_name" relationship_field="supporting_disabled_relationship" reason_field="supporting_disabled_reason" input_field_class="supporting-disabled-input-field" delete_button_class="btn-delete-supporting-disabled" save_selector=".supporting-disabled-input-field" %}
            </tr>
            {% multiple_values_to_list source=supporting_disabled as dependents %}
            {% for dependent in dependents %}
                <tr class="supporting-disabled-item-row">
                    {% include "partials/fact_sheet_supporting_person.html" with name_field="supporting_disabled_name" relationship_field="supporting_disabled_relationship" reason_field="supporting_disabled_reason" input_field_class="supporting-disabled-input-field" delete_button_class="btn-delete-supporting-disabled" name=dependent.supporting_disabled_name relationship=dependent.supporting_disabled_relationship reason=dependent.supporting_disabled_reason save_selector=".supporting-disabled-input-field" %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-supporting-disabled fact-sheet-control" colspan="3" readonly>
                    <a href=""><i class="fa fa-plus btn-add-supporting-disabled"></i> Add Person</a>
                </td>
            </tr>
            </tbody>
        </table>


        <p class="fact-sheet-table-inline-question">
            Other undue hardship circumstances
            {% input_field type="textarea" name="undue_hardship" value="" maxlength="500" multiple='true' class="fact-sheet-input form-control response-textarea" placeholder="" %}
        </p>


        <p><strong>Income of Other Persons in Household</strong></p>
        <p>
            Enter the name (s) and income for any other persons in your household (e.g. co-parent, step parent)
            who have a
            <span class="tooltip-link"
                  data-toggle="tooltip"
                  data-placement="right"
                  data-html="true"
                  title="<b>Duty to support</b><br />
                          Parents and guardians have a responsibility (duty) under the law to financially support their
                          children, whether or not they see or take care of the children.  A parent, for the purposes
                          of child support, may include a stepparent if they were living together, in a relationship,
                          with the child’s parent and the child during the child’s life.  The duty of a stepparent or
                          non-parent guardian to provide support is secondary to that of the child’s parents.">
                    duty to support<i class="fa fa-question-circle" aria-hidden="true"></i>
                </span>


            a child.
        </p>
        <table id="income_others" class="list-builder list-builder-compact">
            <thead>
            <tr class="list-builder-header">
                <th class="table-bordered">Name of person</th>
                <th class="table-bordered">Annual income</th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr class="income-others-group" hidden>
                {% include "partials/fact_sheet_income_others.html" with income_others_amount=0 %}
            </tr>
            {% multiple_values_to_list source=income_others as incomes %}
            {% for income in incomes %}
                <tr class="income-others-item-row">
                    {% include "partials/fact_sheet_income_others.html" with income_others_name=income.income_others_name income_others_amount=income.income_others_amount %}
                </tr>
            {% endfor %}
            </tbody>
            <tbody>
            <tr>
                <td class="table-bordered">
                    Total
                </td>
                <td class="fact-sheet-answer table-bordered" readonly>
                    <div class="dollar-prefix">
                        {% money_input_field id="total_income_others" class="fact-sheet-input money" readonly="" %}
                    </div>
                </td>
            </tr>
            </tbody>
            <tbody>
            <tr>
                <td class="btn-add-income-others fact-sheet-control" colspan="2" readonly>
                    <a href="" tabindex="-1"><i class="fa fa-plus btn-add-income-others"></i> Add Person</a>
                </td>
            </tr>
            </tbody>
        </table>

        <div id="undue_amount_question" hidden></div>
    </div>
</div>
