<b><?php echo $this->user->lang('Select which fields you wish to export and press the button to download the file'); ?>:</b>

<div class="mt-3">
    <?php foreach ($this->fields as $field) { ?>
        <div class="form-check mb-2">
            <input
                type="checkbox"
                class="form-check-input"
                id="tickets_field_<?php echo $field['inputName']; ?>"
                name="tickets_field__<?php echo $field['inputName']; ?>"
                style="margin-right:5px;"
                <?php echo $field['checked']; ?>
            />
            <label class="form-check-label" for="tickets_field_<?php echo $field['inputName']; ?>">
                <?php echo $field['fieldName']; ?>
            </label>
        </div>
    <?php } ?>
</div>

<!-- Ticket Status -->
<div class="mt-4">
    <label class="fw-bold d-block mb-1">
        <?php echo $this->user->lang('Tickets status'); ?>:
    </label>

    <select name="tickets_status" class="normalSelect2 w-auto">
        <option value="all" selected><?php echo $this->user->lang('All Tickets'); ?></option>
        <option value="opened"><?php echo $this->user->lang('Only Open Tickets'); ?></option>
        <option value="closed"><?php echo $this->user->lang('Only Closed Tickets'); ?></option>
    </select>
</div>

<!-- Export Button -->
<button class="cm-btns orange mt-3" id="exportButton">
    <span><?php echo $this->user->lang("Download .csv"); ?></span>
</button>
