{% set userData = app.session.get('userData') %}
<form method="POST" id="form-patientChartPaymentForm">
    <h5>{{ page_title }}</h5>
    <div id="flash-messages-content-modal"></div>
    <div class="row max-width-initial">
        <div class="large-4 columns">
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.payment_type) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.payment_type) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.or_no) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.or_no) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.check_no) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.check_no) }}
                </div>
            </div>
        </div>
        <div class="large-4 columns">
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.payment_date) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.payment_date) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.dr_no) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.dr_no) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.check_date) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.check_date) }}
                </div>
            </div>
        </div>
        <div class="large-4 columns">
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.amount) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.amount) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.barcode) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.barcode) }}
                </div>
            </div>
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.note) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.note) }}
                </div>
            </div>
        </div>
        <hr>
        <div class="large-6 columns">
            <h5 style="text-align: center">Procedures</h5>
            {% for pcmp_form in form.procedures %}
            <div class="row large-text-center">
                <div class="large-4 large-text-right columns">
                    {{ form_widget(pcmp_form.is_checked) }}
                    {{ form_widget(pcmp_form.id) }}
                    {{ form_widget(pcmp_form.patientChartProcedure) }}
                </div>
                <div class="large-8 columns text-left">
                    {{ form_label(pcmp_form.is_checked) }}
                </div>
            </div>
            {% endfor %}
        </div>
        <div class="large-6 columns">
            <h5 style="text-align: center">Other Procedures</h5>
            {% for pcmp_form in form.otherProcedures %}
                <div class="row large-text-center">
                    <div class="large-4 large-text-right columns">
                        {{ form_widget(pcmp_form.is_checked) }}
                        {{ form_widget(pcmp_form.id) }}
                        {{ form_widget(pcmp_form.patientChartOtherProcedure) }}
                    </div>
                    <div class="large-8 columns text-left">
                        {{ form_label(pcmp_form.is_checked) }}
                    </div>
                </div>
            {% endfor %}
        </div>
    </div>
    <hr>
    <div class="row-max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix text-right">
                <a href="javascript:void(0)" class="button just-continue href-patient-chart-payment-action float-right" data-axn="{{ action }}"
                   data-message="Are you sure you want to save this information?"
                   style="margin-left: 10px; margin-right: 0;"
                >Save</a>
                {% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Provider Health Facility Delete' in userData.accesses) %}
                    <a href="javascript:void(0)" class="ask-continue button alert href-patient-chart-payment-action float-right" data-axn="d"
                       data-message="Are you sure you want to delete this record?"
                       style="margin-left: 10px; margin-right: 0;"
                    >Delete</a>
                {% endif %}
                <a href="javascript:void(0)" class="button secondary" data-close style="margin-left: 10px; margin-right: 0;">Close</a>
            </div>
        </div>
    </div>
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form.patient_chart) }}
    {{ form_widget(form._token) }}
</form>
<script language="javascript">
    //<![CDATA[
    jQ(document).ready(function(){
    });
    //]]>
</script>