{% load static %} {% load i18n %}
<div class="oh-modal__dialog-header">
    <h2 class="oh-modal__dialog-title" id="candidateExportLavel">
        {% trans "Export Candidates" %}
    </h2>
    <button class="oh-modal__close" aria-label="Close">
        <ion-icon name="close-outline"></ion-icon>
    </button>
</div>
<div class="oh-modal__dialog-body">
    <form action="{%url 'candidate-info-export' %}" method="get" class="oh-profile-section"
        onsubmit="event.stopPropagation();$(this).parents().find('.oh-modal--show').last().toggleClass('oh-modal--show');"
        id="candidateExportForm">
        {% csrf_token %}
        <div class="oh-dropdown__filter-body" id="">
            <div class="oh-accordion">
                <div class="oh-accordion-header">{% trans "Excel columns" %}</div>
                <div class="oh-accordion-body">
                    <div class="row">
                        <div class="col-sm-12 col-md-12 col-lg-6">
                            <div class="oh-input-group">
                                <label class="oh-label">
                                    <input type="checkbox" id="select-all-fields" /> {% trans "Select All" %}
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        {% for field in export_column.selected_fields %}
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"> {{ field }} </label>
                                </div>
                            </div>
                        {% endfor %}
                    </div>
                </div>
            </div>
            <div class="oh-dropdown__filter-body">
                <div class="oh-accordion">
                    <div class="oh-accordion-header">{% trans "Candidates" %}</div>
                    <div class="oh-accordion-body">
                        <div class="row">
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label class="oh-label">{% trans "Candidate" %}</label>
                                    {{export_filter.form.candidate}}
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.mobile.id_for_label}}">{{export_filter.form.mobile.label}}</label>
                                    {{ export_filter.form.mobile }}
                                </div>
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.interview_date.id_for_label}}">{{export_filter.form.interview_date.label}}</label>
                                    {{ export_filter.form.interview_date }}
                                </div>
                                <div class="oh-input-group">
                                    <label class="oh-label">{{export_filter.form.country.label}}</label>
                                    {{export_filter.form.country}}
                                </div>
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.hired.id_for_label}}">{{export_filter.form.hired.label}}
                                        ?</label>
                                    {{ export_filter.form.hired }}
                                </div>
                                <div class="col-sm-12 col-md-12 col-lg-12 mb-2">
                                    <div class="oh-input-group">
                                        <label class="oh-label"
                                            for="{{export_filter.form.rejected_candidate__reject_reason_id.id_for_label}}">{{export_filter.form.rejected_candidate__reject_reason_id.label}}
                                        </label>
                                        {{export_filter.form.rejected_candidate__reject_reason_id}}
                                    </div>
                                    <div class="oh-input-group">
                                        <label class="oh-label"
                                            for="{{export_filter.form.converted.id_for_label}}">{{export_filter.form.converted.label}}
                                            ?</label>
                                        {{ export_filter.form.converted }}
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.email.id_for_label}}">{{export_filter.form.email.label}}</label>
                                    {{ export_filter.form.email }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.gender.id_for_label}}">{{export_filter.form.gender.label}}</label>
                                    {{ export_filter.form.gender }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label">{{export_filter.form.state.label}}</label>
                                    {{export_filter.form.state}}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.canceled.id_for_label}}">{{export_filter.form.canceled.label}}
                                        ?</label>
                                    {{ export_filter.form.canceled }}
                                </div>
                                <div class="col-sm-12 col-md-12 col-lg-12 mb-2">
                                    <div class="oh-input-group">
                                        <label class="oh-label"
                                            for="{{export_filter.form.offer_letter_status.id_for_label}}">{{export_filter.form.offer_letter_status.label}}
                                        </label>
                                        {{export_filter.form.offer_letter_status}}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="oh-accordion">
                    <div class="oh-accordion-header">
                        {% trans 'Recruitment' %}
                    </div>
                    <div class="oh-accordion-body">
                        <div class="row">
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.recruitment_id.id_for_label}}">{{export_filter.form.recruitment_id.label}}</label>
                                    {{ export_filter.form.recruitment_id }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.job_position_id__department_id.id_for_label}}">{{export_filter.form.job_position_id__department_id.label}}</label>
                                    {{ export_filter.form.job_position_id__department_id }}
                                </div>
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.recruitment_id__recruitment_managers.id_for_label}}">{{export_filter.form.recruitment_id__recruitment_managers.label}}</label>
                                    {{ export_filter.form.recruitment_id__recruitment_managers }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.stage_id.id_for_label}}">{{export_filter.form.stage_id.label}}
                                    </label>
                                    {{ export_filter.form.stage_id }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.stage_id__stage_type.id_for_label}}">{{export_filter.form.stage_id__stage_type.label}}</label>
                                    {{ export_filter.form.stage_id__stage_type }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.start_date.id_for_label}}">{{export_filter.form.start_date.label}}</label>
                                    {{ export_filter.form.start_date }}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.recruitment_id__company_id.id_for_label}}">{{export_filter.form.recruitment_id__company_id.label}}</label>
                                    {{ export_filter.form.recruitment_id__company_id }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.job_position_id.id_for_label}}">{{export_filter.form.job_position_id.label}}</label>
                                    {{ export_filter.form.job_position_id }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.skillzonecandidate_set__skill_zone_id.id_for_label}}">{{export_filter.form.skillzonecandidate_set__skill_zone_id.label}}
                                    </label>
                                    {{ export_filter.form.skillzonecandidate_set__skill_zone_id }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.stage_id__stage_managers.id_for_label}}">{{export_filter.form.stage_id__stage_managers.label}}
                                    </label>
                                    {{ export_filter.form.stage_id__stage_managers }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.recruitment_id__closed.id_for_label}}">{{export_filter.form.recruitment_id__closed.label}}
                                        ?</label>
                                    {{ export_filter.form.recruitment_id__closed }}
                                </div>

                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.end_date.id_for_label}}">{{export_filter.form.end_date.label}}</label>
                                    {{ export_filter.form.end_date }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="oh-accordion">
                    <div class="oh-accordion-header">
                        {% trans 'Advanced' %}
                    </div>
                    <div class="oh-accordion-body">
                        <div class="row">
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.scheduled_from.id_for_label}}">{{export_filter.form.scheduled_from.label}}
                                    </label>
                                    {{ export_filter.form.scheduled_from }}
                                </div>
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.is_active.id_for_label}}">{{export_filter.form.is_active.label}}
                                        ?</label>
                                    {{ export_filter.form.is_active }}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label class="oh-label"
                                        for="{{export_filter.form.scheduled_till.id_for_label}}">{{export_filter.form.scheduled_till.label}}
                                    </label>
                                    {{ export_filter.form.scheduled_till }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="oh-modal__dialog-footer p-0 mt-3">
            <button type="submit" class="oh-btn oh-btn--secondary oh-btn--shadow">
                {% trans "Export" %}
            </button>
        </div>
    </form>
</div>
