<?php

namespace PHPMaker2023\Jack_Jill_school;

// Page object
$VolontaireList = &$Page;
?>
<?php if (!$Page->isExport()) { ?>
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { volontaire: currentTable } });
var currentPageID = ew.PAGE_ID = "list";
var currentForm;
var <?= $Page->FormName ?>;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

    // Form object
    let form = new ew.FormBuilder()
        .setId("<?= $Page->FormName ?>")
        .setPageId("list")
        .setFormKeyCountName("<?= $Page->FormKeyCountName ?>")
        .build();
    window[form.id] = form;
    currentForm = form;
    loadjs.done(form.id);
});
</script>
<script>
ew.PREVIEW_SELECTOR = ".ew-preview-btn";
ew.PREVIEW_MODAL_CLASS = "modal modal-fullscreen-sm-down";
ew.PREVIEW_ROW = true;
ew.PREVIEW_SINGLE_ROW = false;
ew.PREVIEW || ew.ready("head", ew.PATH_BASE + "js/preview.min.js?v=19.10.0", "preview");
</script>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<?php } ?>
<?php if (!$Page->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($Page->TotalRecords > 0 && $Page->ExportOptions->visible()) { ?>
<?php $Page->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($Page->ImportOptions->visible()) { ?>
<?php $Page->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($Page->SearchOptions->visible()) { ?>
<?php $Page->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($Page->FilterOptions->visible()) { ?>
<?php $Page->FilterOptions->render("body") ?>
<?php } ?>
</div>
<?php } ?>
<?php if ($Page->ShowCurrentFilter) { ?>
<?php $Page->showFilterList() ?>
<?php } ?>
<?php if (!$Page->IsModal) { ?>
<form name="fvolontairesrch" id="fvolontairesrch" class="ew-form ew-ext-search-form" action="<?= CurrentPageUrl(false) ?>" novalidate autocomplete="on">
<div id="fvolontairesrch_search_panel" class="mb-2 mb-sm-0 <?= $Page->SearchPanelClass ?>"><!-- .ew-search-panel -->
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { volontaire: currentTable } });
var currentForm;
var fvolontairesrch, currentSearchForm, currentAdvancedSearchForm;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery,
        fields = currentTable.fields;

    // Form object for search
    let form = new ew.FormBuilder()
        .setId("fvolontairesrch")
        .setPageId("list")

        // Add fields
        .addFields([
            ["Carte_No", [], fields.Carte_No.isInvalid],
            ["NIP", [], fields.NIP.isInvalid],
            ["Nom", [], fields.Nom.isInvalid],
            ["Prenom", [], fields.Prenom.isInvalid],
            ["DateNaissance", [], fields.DateNaissance.isInvalid],
            ["Lieu", [], fields.Lieu.isInvalid],
            ["Photo", [], fields.Photo.isInvalid],
            ["Unique_QR", [], fields.Unique_QR.isInvalid],
            ["Delivree", [], fields.Delivree.isInvalid],
            ["Expire", [], fields.Expire.isInvalid],
            ["Localite", [], fields.Localite.isInvalid],
            ["Statut", [], fields.Statut.isInvalid]
        ])
        // Validate form
        .setValidate(
            async function () {
                if (!this.validateRequired)
                    return true; // Ignore validation
                let fobj = this.getForm();

                // Validate fields
                if (!this.validateFields())
                    return false;

                // Call Form_CustomValidate event
                if (!(await this.customValidate?.(fobj) ?? true)) {
                    this.focus();
                    return false;
                }
                return true;
            }
        )

        // Form_CustomValidate
        .setCustomValidate(
            function (fobj) { // DO NOT CHANGE THIS LINE! (except for adding "async" keyword)!
                    // Your custom validation code here, return false if invalid.
                    return true;
                }
        )

        // Use JavaScript validation or not
        .setValidateRequired(ew.CLIENT_VALIDATE)

        // Dynamic selection lists
        .setLists({
            "Carte_No": <?= $Page->Carte_No->toClientList($Page) ?>,
            "NIP": <?= $Page->NIP->toClientList($Page) ?>,
            "Nom": <?= $Page->Nom->toClientList($Page) ?>,
            "Unique_QR": <?= $Page->Unique_QR->toClientList($Page) ?>,
            "Localite": <?= $Page->Localite->toClientList($Page) ?>,
            "Statut": <?= $Page->Statut->toClientList($Page) ?>,
        })

        // Filters
        .setFilterList(<?= $Page->getFilterList() ?>)

        // Init search panel as collapsed
        .setInitSearchPanel(true)
        .build();
    window[form.id] = form;
    currentSearchForm = form;
    loadjs.done(form.id);
});
</script>
<input type="hidden" name="cmd" value="search">
<?php if ($Security->canSearch()) { ?>
<?php if (!$Page->isExport() && !($Page->CurrentAction && $Page->CurrentAction != "search") && $Page->hasSearchFields()) { ?>
<div class="ew-extended-search container-fluid ps-2">
<div class="row mb-0<?= ($Page->SearchFieldsPerRow > 0) ? " row-cols-sm-" . $Page->SearchFieldsPerRow : "" ?>">
<?php
// Render search row
$Page->RowType = ROWTYPE_SEARCH;
$Page->resetAttributes();
$Page->renderRow();
?>
<?php if ($Page->Carte_No->Visible) { // Carte_No ?>
<?php
if (!$Page->Carte_No->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_Carte_No" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->Carte_No->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label class="ew-search-caption ew-label"><?= $Page->Carte_No->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("=") ?>
<input type="hidden" name="z_Carte_No" id="z_Carte_No" value="=">
</div>
        </div>
        <div id="el_volontaire_Carte_No" class="ew-search-field">
<?php
if (IsRTL()) {
    $Page->Carte_No->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Carte_No" class="ew-auto-suggest">
    <input type="<?= $Page->Carte_No->getInputTextType() ?>" class="form-control" name="sv_x_Carte_No" id="sv_x_Carte_No" value="<?= RemoveHtml($Page->Carte_No->EditValue) ?>" autocomplete="off" size="30" maxlength="20" placeholder="<?= HtmlEncode($Page->Carte_No->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Carte_No->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Carte_No->formatPattern()) ?>"<?= $Page->Carte_No->editAttributes() ?>>
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Carte_No" data-input="sv_x_Carte_No" data-value-separator="<?= $Page->Carte_No->displayValueSeparatorAttribute() ?>" name="x_Carte_No" id="x_Carte_No" value="<?= HtmlEncode($Page->Carte_No->AdvancedSearch->SearchValue) ?>"></selection-list>
<div class="invalid-feedback"><?= $Page->Carte_No->getErrorMessage(false) ?></div>
<script>
loadjs.ready("fvolontairesrch", function() {
    fvolontairesrch.createAutoSuggest(Object.assign({"id":"x_Carte_No","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Carte_No->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Carte_No.autoSuggestOptions));
});
</script>
<?= $Page->Carte_No->Lookup->getParamTag($Page, "p_x_Carte_No") ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->NIP->Visible) { // NIP ?>
<?php
if (!$Page->NIP->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_NIP" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->NIP->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label class="ew-search-caption ew-label"><?= $Page->NIP->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("=") ?>
<input type="hidden" name="z_NIP" id="z_NIP" value="=">
</div>
        </div>
        <div id="el_volontaire_NIP" class="ew-search-field">
<?php
if (IsRTL()) {
    $Page->NIP->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_NIP" class="ew-auto-suggest">
    <input type="<?= $Page->NIP->getInputTextType() ?>" class="form-control" name="sv_x_NIP" id="sv_x_NIP" value="<?= RemoveHtml($Page->NIP->EditValue) ?>" autocomplete="off" size="30" maxlength="57" placeholder="<?= HtmlEncode($Page->NIP->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->NIP->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->NIP->formatPattern()) ?>"<?= $Page->NIP->editAttributes() ?>>
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_NIP" data-input="sv_x_NIP" data-value-separator="<?= $Page->NIP->displayValueSeparatorAttribute() ?>" name="x_NIP" id="x_NIP" value="<?= HtmlEncode($Page->NIP->AdvancedSearch->SearchValue) ?>"></selection-list>
<div class="invalid-feedback"><?= $Page->NIP->getErrorMessage(false) ?></div>
<script>
loadjs.ready("fvolontairesrch", function() {
    fvolontairesrch.createAutoSuggest(Object.assign({"id":"x_NIP","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->NIP->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.NIP.autoSuggestOptions));
});
</script>
<?= $Page->NIP->Lookup->getParamTag($Page, "p_x_NIP") ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->Nom->Visible) { // Nom ?>
<?php
if (!$Page->Nom->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_Nom" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->Nom->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label class="ew-search-caption ew-label"><?= $Page->Nom->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("=") ?>
<input type="hidden" name="z_Nom" id="z_Nom" value="=">
</div>
        </div>
        <div id="el_volontaire_Nom" class="ew-search-field">
<?php
if (IsRTL()) {
    $Page->Nom->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Nom" class="ew-auto-suggest">
    <input type="<?= $Page->Nom->getInputTextType() ?>" class="form-control" name="sv_x_Nom" id="sv_x_Nom" value="<?= RemoveHtml($Page->Nom->EditValue) ?>" autocomplete="off" size="30" maxlength="60" placeholder="<?= HtmlEncode($Page->Nom->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Nom->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Nom->formatPattern()) ?>"<?= $Page->Nom->editAttributes() ?>>
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Nom" data-input="sv_x_Nom" data-value-separator="<?= $Page->Nom->displayValueSeparatorAttribute() ?>" name="x_Nom" id="x_Nom" value="<?= HtmlEncode($Page->Nom->AdvancedSearch->SearchValue) ?>"></selection-list>
<div class="invalid-feedback"><?= $Page->Nom->getErrorMessage(false) ?></div>
<script>
loadjs.ready("fvolontairesrch", function() {
    fvolontairesrch.createAutoSuggest(Object.assign({"id":"x_Nom","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Nom->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Nom.autoSuggestOptions));
});
</script>
<?= $Page->Nom->Lookup->getParamTag($Page, "p_x_Nom") ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->Unique_QR->Visible) { // Unique_QR ?>
<?php
if (!$Page->Unique_QR->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_Unique_QR" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->Unique_QR->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label class="ew-search-caption ew-label"><?= $Page->Unique_QR->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("=") ?>
<input type="hidden" name="z_Unique_QR" id="z_Unique_QR" value="=">
</div>
        </div>
        <div id="el_volontaire_Unique_QR" class="ew-search-field">
<?php
if (IsRTL()) {
    $Page->Unique_QR->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Unique_QR" class="ew-auto-suggest">
    <input type="<?= $Page->Unique_QR->getInputTextType() ?>" class="form-control" name="sv_x_Unique_QR" id="sv_x_Unique_QR" value="<?= RemoveHtml($Page->Unique_QR->EditValue) ?>" autocomplete="off" size="30" maxlength="12" placeholder="<?= HtmlEncode($Page->Unique_QR->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Unique_QR->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Unique_QR->formatPattern()) ?>"<?= $Page->Unique_QR->editAttributes() ?>>
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Unique_QR" data-input="sv_x_Unique_QR" data-value-separator="<?= $Page->Unique_QR->displayValueSeparatorAttribute() ?>" name="x_Unique_QR" id="x_Unique_QR" value="<?= HtmlEncode($Page->Unique_QR->AdvancedSearch->SearchValue) ?>"></selection-list>
<div class="invalid-feedback"><?= $Page->Unique_QR->getErrorMessage(false) ?></div>
<script>
loadjs.ready("fvolontairesrch", function() {
    fvolontairesrch.createAutoSuggest(Object.assign({"id":"x_Unique_QR","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Unique_QR->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Unique_QR.autoSuggestOptions));
});
</script>
<?= $Page->Unique_QR->Lookup->getParamTag($Page, "p_x_Unique_QR") ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->Localite->Visible) { // Localite ?>
<?php
if (!$Page->Localite->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_Localite" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->Localite->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label class="ew-search-caption ew-label"><?= $Page->Localite->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("=") ?>
<input type="hidden" name="z_Localite" id="z_Localite" value="=">
</div>
        </div>
        <div id="el_volontaire_Localite" class="ew-search-field">
<?php
if (IsRTL()) {
    $Page->Localite->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Localite" class="ew-auto-suggest">
    <input type="<?= $Page->Localite->getInputTextType() ?>" class="form-control" name="sv_x_Localite" id="sv_x_Localite" value="<?= RemoveHtml($Page->Localite->EditValue) ?>" autocomplete="off" size="30" maxlength="60" placeholder="<?= HtmlEncode($Page->Localite->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Localite->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Localite->formatPattern()) ?>"<?= $Page->Localite->editAttributes() ?>>
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Localite" data-input="sv_x_Localite" data-value-separator="<?= $Page->Localite->displayValueSeparatorAttribute() ?>" name="x_Localite" id="x_Localite" value="<?= HtmlEncode($Page->Localite->AdvancedSearch->SearchValue) ?>"></selection-list>
<div class="invalid-feedback"><?= $Page->Localite->getErrorMessage(false) ?></div>
<script>
loadjs.ready("fvolontairesrch", function() {
    fvolontairesrch.createAutoSuggest(Object.assign({"id":"x_Localite","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Localite->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Localite.autoSuggestOptions));
});
</script>
<?= $Page->Localite->Lookup->getParamTag($Page, "p_x_Localite") ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->Statut->Visible) { // Statut ?>
<?php
if (!$Page->Statut->UseFilter) {
    $Page->SearchColumnCount++;
}
?>
    <div id="xs_Statut" class="col-sm-auto d-sm-flex align-items-start mb-3 px-0 pe-sm-2<?= $Page->Statut->UseFilter ? " ew-filter-field" : "" ?>">
        <div class="d-flex my-1 my-sm-0">
            <label for="x_Statut" class="ew-search-caption ew-label"><?= $Page->Statut->caption() ?></label>
            <div class="ew-search-operator">
<?= $Language->phrase("LIKE") ?>
<input type="hidden" name="z_Statut" id="z_Statut" value="LIKE">
</div>
        </div>
        <div id="el_volontaire_Statut" class="ew-search-field">
    <select
        id="x_Statut"
        name="x_Statut"
        class="form-select ew-select<?= $Page->Statut->isInvalidClass() ?>"
        <?php if (!$Page->Statut->IsNativeSelect) { ?>
        data-select2-id="fvolontairesrch_x_Statut"
        <?php } ?>
        data-table="volontaire"
        data-field="x_Statut"
        data-value-separator="<?= $Page->Statut->displayValueSeparatorAttribute() ?>"
        data-placeholder="<?= HtmlEncode($Page->Statut->getPlaceHolder()) ?>"
        <?= $Page->Statut->editAttributes() ?>>
        <?= $Page->Statut->selectOptionListHtml("x_Statut") ?>
    </select>
    <div class="invalid-feedback"><?= $Page->Statut->getErrorMessage(false) ?></div>
<?php if (!$Page->Statut->IsNativeSelect) { ?>
<script>
loadjs.ready("fvolontairesrch", function() {
    var options = { name: "x_Statut", selectId: "fvolontairesrch_x_Statut" },
        el = document.querySelector("select[data-select2-id='" + options.selectId + "']");
    if (!el)
        return;
    options.closeOnSelect = !options.multiple;
    options.dropdownParent = el.closest("#ew-modal-dialog, #ew-add-opt-dialog");
    if (fvolontairesrch.lists.Statut?.lookupOptions.length) {
        options.data = { id: "x_Statut", form: "fvolontairesrch" };
    } else {
        options.ajax = { id: "x_Statut", form: "fvolontairesrch", limit: ew.LOOKUP_PAGE_SIZE };
    }
    options.minimumResultsForSearch = Infinity;
    options = Object.assign({}, ew.selectOptions, options, ew.vars.tables.volontaire.fields.Statut.selectOptions);
    ew.createSelect(options);
});
</script>
<?php } ?>
</div>
        <div class="d-flex my-1 my-sm-0">
        </div><!-- /.ew-search-field -->
    </div><!-- /.col-sm-auto -->
<?php } ?>
<?php if ($Page->SearchColumnCount > 0) { ?>
   <div class="col-sm-auto mb-3">
       <button class="btn btn-primary" name="btn-submit" id="btn-submit" type="submit"><?= $Language->phrase("SearchBtn") ?></button>
   </div>
<?php } ?>
</div><!-- /.row -->
<!-- template for quick search in navbar -->
<script id="navbar-basic-search" type="text/html" class="ew-js-template" data-name="search" data-seq="10" data-data="menu" data-target="#ew-navbar-end" data-method="prependTo">
    <li class="nav-item navbar-basic-search">
        <a class="nav-link" data-widget="navbar-search" href="#" role="button">
            <i class="fa-solid fa-magnifying-glass"></i>
        </a>
        <div class="navbar-search-block">
            <div class="ew-basic-search input-group input-group-sm">
                <input type="text" name="<?= Config("TABLE_BASIC_SEARCH") ?>" id="<?= Config("TABLE_BASIC_SEARCH") ?>" class="form-control form-control-navbar ew-basic-search-keyword" form="fvolontairesrch" value="<?= HtmlEncode($Page->BasicSearch->getKeyword()) ?>" placeholder="<?= HtmlEncode($Language->phrase("Search")) ?>" aria-label="<?= HtmlEncode($Language->phrase("Search")) ?>">
                <input type="hidden" name="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" id="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" class="form-control-navbar ew-basic-search-type" form="fvolontairesrch" value="<?= HtmlEncode($Page->BasicSearch->getType()) ?>">
                <button class="btn btn-navbar" form="fvolontairesrch" type="submit">
                    <i class="fa-solid fa-magnifying-glass"></i>
                </button>
                <button type="button" data-bs-toggle="dropdown" class="btn btn-navbar dropdown-toggle" aria-haspopup="true" aria-expanded="false">
                    <span id="searchtype"><?= $Page->BasicSearch->getTypeNameShort() ?></span>
                </button>
                <div class="dropdown-menu dropdown-menu-end">
                    <button type="button" class="dropdown-item<?= $Page->BasicSearch->getType() == "" ? " active" : "" ?>" form="fvolontairesrch" data-ew-action="search-type"><?= $Language->phrase("QuickSearchAuto") ?></button>
                    <button type="button" class="dropdown-item<?= $Page->BasicSearch->getType() == "=" ? " active" : "" ?>" form="fvolontairesrch" data-ew-action="search-type" data-search-type="="><?= $Language->phrase("QuickSearchExact") ?></button>
                    <button type="button" class="dropdown-item<?= $Page->BasicSearch->getType() == "AND" ? " active" : "" ?>" form="fvolontairesrch" data-ew-action="search-type" data-search-type="AND"><?= $Language->phrase("QuickSearchAll") ?></button>
                    <button type="button" class="dropdown-item<?= $Page->BasicSearch->getType() == "OR" ? " active" : "" ?>" form="fvolontairesrch" data-ew-action="search-type" data-search-type="OR"><?= $Language->phrase("QuickSearchAny") ?></button>
                </div>
                <button class="btn btn-navbar" type="button" data-widget="navbar-search">
                    <i class="fa-solid fa-xmark"></i>
                </button>
            </div>
        </div>
    </li>
</script>
</div><!-- /.ew-extended-search -->
<?php } ?>
<?php } ?>
</div><!-- /.ew-search-panel -->
</form>
<?php } ?>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<?php if (MS_SHOW_EMPTY_TABLE_ON_LIST_PAGE == TRUE) { ?>
<main class="list<?= ($Page->TotalRecords == 0 && !$Page->isAdd()) ? "" : "" ?>">
<?php } else { ?>
<main class="list<?= ($Page->TotalRecords == 0 && !$Page->isAdd()) ? " ew-no-record" : "" ?>">
<?php } ?>
<div id="ew-list">
<?php if ($Page->TotalRecords > 0 || $Page->CurrentAction) { ?>
<div class="ew-multi-column-grid p-0 overlay-wrapper">
<?php $Page->LayoutOptions->render("body") ?>
<?= $this->fetch("Volontaire" . ucfirst($Page->MultiColumnLayout) . ".php", $GLOBALS); // Multi-column layout ?>
</div><!-- /.ew-multi-column-grid -->
<?php } ?>
<?php if ($Page->TotalRecords == 0 && !$Page->CurrentAction) { // Show other options ?>
<?php // Begin of Empty Table by UDS Hub, September 30, 2020 ?>
<?php if (MS_SHOW_EMPTY_TABLE_ON_LIST_PAGE == TRUE) { ?>
<div class="ew-multi-column-grid p-0 overlay-wrapper">
<?php $Page->LayoutOptions->render("body") ?>
<?= $this->fetch("Volontaire" . ucfirst($Page->MultiColumnLayout) . ".php", $GLOBALS); // Multi-column layout ?>
</div><!-- /.ew-multi-column-grid -->
<?php } else { ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } // end of Empty Table by UDS Hub, September 30, 2020 ?>
<?php } ?>
</div>
</main>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<?php if (!$Page->isExport()) { ?>
<script>
loadjs.ready("infinitescroll", () => new ew.InfiniteScroll("gmp_volontaire", { ...{"threshold":"","rootMargin":null}, ...{pageCount:<?= $Page->pageCount() ?>} }));
</script>
<?php } ?>
<?php if (!$Page->isExport()) { ?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("volontaire");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php if (!$volontaire->isExport()) { ?>
<script>
loadjs.ready("jqueryjs", function() {
	var expires = new Date(new Date().getTime() + 525600 * 60 * 1000); // expire in 525600 
	var SearchToggle = $('.ew-search-toggle'); 
	SearchToggle.on('click', function(event) { 
		event.preventDefault(); 
		if (SearchToggle.hasClass('active')) { 
			Cookies.set("volontaire_searchpanel", "notactive", { path: '', expires: expires }); 
		} else { 
			Cookies.set("volontaire_searchpanel", "active", { path: '', expires: expires }); 
		} 
	});
});
</script>
<?php } ?>
<?php if (!$Page->isExport()) { ?>
<script>
loadjs.ready("head", function() {
	$(".ew-grid").css("width", "100%");
	$(".sidebar, .main-sidebar, .main-header, .header-navbar, .main-menu").on("mouseenter", function(event) {
		$(".ew-grid").css("width", "100%");
	});
	$(".sidebar, .main-sidebar, .main-header, .header-navbar, .main-menu").on("mouseover", function(event) {
		$(".ew-grid").css("width", "100%");
	});
	var cssTransitionEnd = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
	$('.main-header').on(cssTransitionEnd, function(event) {
		$(".ew-grid").css("width", "100%");
	});
	$(document).on('resize', function() {
		if ($('.ew-grid').length > 0) {
			$(".ew-grid").css("width", "100%");
		}
	});
	$(".nav-item.d-block").on("click", function(event) {
		$(".ew-grid").css("width", "100%");
	});
});
</script>
<?php } ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(fvolontaireadd.validateFields()){ew.prompt({title: ew.language.phrase("MessageAddConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#fvolontaireadd").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php if ($Page->isConfirm()) { // Confirm page ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(fvolontaireedit.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#fvolontaireedit").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php } ?>
<?php if (!$Page->isConfirm()) { // Confirm page ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(fvolontaireupdate.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result) $("#fvolontaireupdate").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php } ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(fvolontairedelete.validateFields()){ew.prompt({title: ew.language.phrase("MessageDeleteConfirm"),icon:'question',showCancelButton:true},result=>{if(result) $("#fvolontairedelete").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php if (!$Page->IsModal && !$Page->isExport() && CurrentPageID()=="list") { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('.ew-grid-save, .ew-grid-insert').on('click',function(){ew.prompt({title: ew.language.phrase("MessageSaveGridConfirm"),icon:'question',showCancelButton:true},result=>{if(result) $("#fvolontairelist").submit();});return false;});});
</script>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('.ew-inline-update').on('click',function(){ew.prompt({title: ew.language.phrase("MessageSaveGridConfirm"),icon:'question',showCancelButton:true},result=>{if(result) $("#fvolontairelist").submit();});return false;});});
</script>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('.ew-inline-insert').on('click',function(){ew.prompt({title: ew.language.phrase("MessageSaveGridConfirm"),icon:'question',showCancelButton:true},result=>{if(result) $("#fvolontairelist").submit();});return false;});});
</script>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){var gridchange=false;$('[data-table="volontaire"]').change(function(){	gridchange=true;});$('.ew-grid-cancel,.ew-inline-cancel').click(function(){if (gridchange==true){ew.prompt({title: ew.language.phrase("ConfirmCancel"),icon:'question',showCancelButton:true},result=>{if(result) window.location = "<?php echo str_replace('_', '', 'volontairelist'); ?>";});return false;}});});
</script>
<?php } ?>
<?php } ?>
