{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container has-loading">
                <div class="content-container-content hide">
                    <div class="row max-width-initial">
                        <div class="large-4 columns">
                            <div class="input-group">
                                <label class="input-group-label">Status</label>
                                <select class="input-group-field" id="status-filter">
                                    <option value='All' selected>All</option>
                                    <option value='Sent'>Sent</option>
                                    <option value='Pending'>Pending</option>
                                </select>
                            </div>
                        </div>
                        <div class="large-4 columns"></div>
                        {% if userData.type == 'Super Admin' or 'Admin Faxing Option' in userData.accesses %}
                            <div class="large-4 columns">
                                <div class="text-right">
                                    <label class="text-right">
                                        <a href="javascript:void(0)" class="href-faxingOption-form href-new-action" data-action="n" data-id="0">Create Fax</a>
                                    </label>
                                </div>
                            </div>
                        {% endif %}
                    </div>
                    <table class="display responsive" id="faxingOption-datalist" width="100%">
                        <thead>
                        <tr>
                            {#<th>No</th>#}
                            <th style="text-align: center">Created Date</th>
                            <th>Fax #</th>
                            <th>Fax To</th>
                            <th>Patient</th>
                            <th>Attachments</th>
                            <th>Status</th>
                            <th>Fax Confirmation</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="reveal small" id="modal-small" data-reveal>
        <div id="modal-content-small"></div>
        <button class="close-button" data-close aria-label="Close modal" type="button">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        faxingOption.settings.ajaxUrl = '{{ path('faxing_option_ajax_list') }}';
        faxingOption.settings.faxingOptionFormUrl = '{{ path('faxing_option_form') }}';
        faxingOption.settings.faxingOptionFormActionUrl = '{{ path('faxing_option_form_save') }}';
        faxingOption.settings.patient_autocomplete_url = '{{ path('patient_autocomplete') }}';
        faxingOption.settings.insurance_autocomplete_url = '{{ path('insurance_autocomplete') }}';
        faxingOption.settings.referring_provider_autocomplete_url = '{{ path('referring_provider_autocomplete') }}';
        faxingOption.settings.referring_health_facility_autocomplete_url = '{{ path('referring_health_facility_autocomplete') }}';
        faxingOption.settings.company_autocomplete_url = '{{ path('company_autocomplete') }}';
        jQ(document).ready(function(){
            faxingOption.init();
        });
        //]]>
    </script>
{% endblock %}