<?php

namespace PHPMaker2021\rdigital21;

// Page object
$PesertaDidikList = &$Page;
?>
<?php if (!$Page->isExport()) { ?>
<script>
var currentForm, currentPageID;
var fpeserta_didiklist;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "list";
    fpeserta_didiklist = currentForm = new ew.Form("fpeserta_didiklist", "list");
    fpeserta_didiklist.formKeyCountName = '<?= $Page->FormKeyCountName ?>';
    loadjs.done("fpeserta_didiklist");
});
var fpeserta_didiklistsrch, currentSearchForm, currentAdvancedSearchForm;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object for search
    fpeserta_didiklistsrch = currentSearchForm = new ew.Form("fpeserta_didiklistsrch");

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "peserta_didik")) ?>,
        fields = currentTable.fields;
    fpeserta_didiklistsrch.addFields([
        ["kode_tapel", [], fields.kode_tapel.isInvalid],
        ["kelas", [], fields.kelas.isInvalid],
        ["nisn", [], fields.nisn.isInvalid],
        ["nis", [], fields.nis.isInvalid],
        ["nama", [], fields.nama.isInvalid],
        ["jk", [], fields.jk.isInvalid],
        ["tmp_lahir", [], fields.tmp_lahir.isInvalid],
        ["tgl_lahir", [], fields.tgl_lahir.isInvalid],
        ["agama", [], fields.agama.isInvalid],
        ["status", [], fields.status.isInvalid],
        ["sekolah_asal", [], fields.sekolah_asal.isInvalid],
        ["diterima_di_kls", [], fields.diterima_di_kls.isInvalid],
        ["tanggal", [], fields.tanggal.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        fpeserta_didiklistsrch.setInvalid();
    });

    // Validate form
    fpeserta_didiklistsrch.validate = function () {
        if (!this.validateRequired)
            return true; // Ignore validation
        var fobj = this.getForm(),
            $fobj = $(fobj),
            rowIndex = "";
        $fobj.data("rowindex", rowIndex);

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

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

    // Form_CustomValidate
    fpeserta_didiklistsrch.customValidate = function(fobj) { // DO NOT CHANGE THIS LINE!
        // Your custom validation code here, return false if invalid.
        return true;
    }

    // Use JavaScript validation or not
    fpeserta_didiklistsrch.validateRequired = <?= Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

    // Dynamic selection lists
    fpeserta_didiklistsrch.lists.kelas = <?= $Page->kelas->toClientList($Page) ?>;

    // Filters
    fpeserta_didiklistsrch.filterList = <?= $Page->getFilterList() ?>;

    // Init search panel as collapsed
    fpeserta_didiklistsrch.initSearchPanel = true;
    loadjs.done("fpeserta_didiklistsrch");
});
</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 class="clearfix"></div>
</div>
<?php } ?>
<?php
$Page->renderOtherOptions();
?>
<?php if ($Security->canSearch()) { ?>
<?php if (!$Page->isExport() && !$Page->CurrentAction) { ?>
<form name="fpeserta_didiklistsrch" id="fpeserta_didiklistsrch" class="form-inline ew-form ew-ext-search-form" action="<?= CurrentPageUrl(false) ?>">
<div id="fpeserta_didiklistsrch-search-panel" class="<?= $Page->SearchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="peserta_didik">
    <div class="ew-extended-search">
<?php
// Render search row
$Page->RowType = ROWTYPE_SEARCH;
$Page->resetAttributes();
$Page->renderRow();
?>
<?php if ($Page->kelas->Visible) { // kelas ?>
    <?php
        $Page->SearchColumnCount++;
        if (($Page->SearchColumnCount - 1) % $Page->SearchFieldsPerRow == 0) {
            $Page->SearchRowCount++;
    ?>
<div id="xsr_<?= $Page->SearchRowCount ?>" class="ew-row d-sm-flex">
    <?php
        }
     ?>
    <div id="xsc_kelas" class="ew-cell form-group">
        <label for="x_kelas" class="ew-search-caption ew-label"><?= $Page->kelas->caption() ?></label>
        <span class="ew-search-operator">
<?= $Language->phrase("LIKE") ?>
<input type="hidden" name="z_kelas" id="z_kelas" value="LIKE">
</span>
        <span id="el_peserta_didik_kelas" class="ew-search-field">
<?php if (!$Security->isAdmin() && $Security->isLoggedIn() && !$Page->userIDAllow($Page->CurrentAction)) { // Non system admin ?>
<span<?= $Page->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kelas->getDisplayValue($Page->kelas->EditValue))) ?>"></span>
<input type="hidden" data-table="peserta_didik" data-field="x_kelas" data-hidden="1" name="x_kelas" id="x_kelas" value="<?= HtmlEncode($Page->kelas->AdvancedSearch->SearchValue) ?>">
<?php } else { ?>
    <select
        id="x_kelas"
        name="x_kelas"
        class="form-control ew-select<?= $Page->kelas->isInvalidClass() ?>"
        data-select2-id="peserta_didik_x_kelas"
        data-table="peserta_didik"
        data-field="x_kelas"
        data-value-separator="<?= $Page->kelas->displayValueSeparatorAttribute() ?>"
        <?= $Page->kelas->editAttributes() ?>>
        <?= $Page->kelas->selectOptionListHtml("x_kelas") ?>
    </select>
    <div class="invalid-feedback"><?= $Page->kelas->getErrorMessage(false) ?></div>
<?= $Page->kelas->Lookup->getParamTag($Page, "p_x_kelas") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='peserta_didik_x_kelas']"),
        options = { name: "x_kelas", selectId: "peserta_didik_x_kelas", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.peserta_didik.fields.kelas.selectOptions);
    ew.createSelect(options);
});
</script>
<?php } ?>
</span>
    </div>
    <?php if ($Page->SearchColumnCount % $Page->SearchFieldsPerRow == 0) { ?>
</div>
    <?php } ?>
<?php } ?>
    <?php if ($Page->SearchColumnCount % $Page->SearchFieldsPerRow > 0) { ?>
</div>
    <?php } ?>
<div id="xsr_<?= $Page->SearchRowCount + 1 ?>" class="ew-row d-sm-flex">
    <div class="ew-quick-search input-group">
        <input type="text" name="<?= Config("TABLE_BASIC_SEARCH") ?>" id="<?= Config("TABLE_BASIC_SEARCH") ?>" class="form-control" value="<?= HtmlEncode($Page->BasicSearch->getKeyword()) ?>">
        <input type="hidden" name="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" id="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" value="<?= HtmlEncode($Page->BasicSearch->getType()) ?>">
        <div class="input-group-append">
            <button class="btn btn-primary" name="btn-submit" id="btn-submit" type="submit"><?= $Language->phrase("SearchBtn") ?></button>
            <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle dropdown-toggle-split" aria-haspopup="true" aria-expanded="false"><span id="searchtype"><?= $Page->BasicSearch->getTypeNameShort() ?></span></button>
            <div class="dropdown-menu dropdown-menu-right">
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this);"><?= $Language->phrase("QuickSearchAuto") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "=") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, '=');"><?= $Language->phrase("QuickSearchExact") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "AND") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'AND');"><?= $Language->phrase("QuickSearchAll") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "OR") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'OR');"><?= $Language->phrase("QuickSearchAny") ?></a>
            </div>
        </div>
    </div>
</div>
    </div><!-- /.ew-extended-search -->
</div><!-- /.ew-search-panel -->
</form>
<?php } ?>
<?php } ?>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<?php if ($Page->TotalRecords > 0 || $Page->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($Page->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> peserta_didik">
<?php if (!$Page->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$Page->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?= CurrentPageUrl(false) ?>">
<?= $Page->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="fpeserta_didiklist" id="fpeserta_didiklist" class="form-inline ew-form ew-list-form" action="<?= CurrentPageUrl(false) ?>" method="post">
<?php if (Config("CHECK_TOKEN")) { ?>
<input type="hidden" name="<?= $TokenNameKey ?>" value="<?= $TokenName ?>"><!-- CSRF token name -->
<input type="hidden" name="<?= $TokenValueKey ?>" value="<?= $TokenValue ?>"><!-- CSRF token value -->
<?php } ?>
<input type="hidden" name="t" value="peserta_didik">
<div id="gmp_peserta_didik" class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<?php if ($Page->TotalRecords > 0 || $Page->isGridEdit()) { ?>
<table id="tbl_peserta_didiklist" class="table ew-table"><!-- .ew-table -->
<thead>
    <tr class="ew-table-header">
<?php
// Header row
$Page->RowType = ROWTYPE_HEADER;

// Render list options
$Page->renderListOptions();

// Render list options (header, left)
$Page->ListOptions->render("header", "left");
?>
<?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <th data-name="kode_tapel" class="<?= $Page->kode_tapel->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_kode_tapel" class="peserta_didik_kode_tapel"><?= $Page->renderSort($Page->kode_tapel) ?></div></th>
<?php } ?>
<?php if ($Page->kelas->Visible) { // kelas ?>
        <th data-name="kelas" class="<?= $Page->kelas->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_kelas" class="peserta_didik_kelas"><?= $Page->renderSort($Page->kelas) ?></div></th>
<?php } ?>
<?php if ($Page->nisn->Visible) { // nisn ?>
        <th data-name="nisn" class="<?= $Page->nisn->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_nisn" class="peserta_didik_nisn"><?= $Page->renderSort($Page->nisn) ?></div></th>
<?php } ?>
<?php if ($Page->nis->Visible) { // nis ?>
        <th data-name="nis" class="<?= $Page->nis->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_nis" class="peserta_didik_nis"><?= $Page->renderSort($Page->nis) ?></div></th>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
        <th data-name="nama" class="<?= $Page->nama->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_nama" class="peserta_didik_nama"><?= $Page->renderSort($Page->nama) ?></div></th>
<?php } ?>
<?php if ($Page->jk->Visible) { // jk ?>
        <th data-name="jk" class="<?= $Page->jk->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_jk" class="peserta_didik_jk"><?= $Page->renderSort($Page->jk) ?></div></th>
<?php } ?>
<?php if ($Page->tmp_lahir->Visible) { // tmp_lahir ?>
        <th data-name="tmp_lahir" class="<?= $Page->tmp_lahir->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_tmp_lahir" class="peserta_didik_tmp_lahir"><?= $Page->renderSort($Page->tmp_lahir) ?></div></th>
<?php } ?>
<?php if ($Page->tgl_lahir->Visible) { // tgl_lahir ?>
        <th data-name="tgl_lahir" class="<?= $Page->tgl_lahir->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_tgl_lahir" class="peserta_didik_tgl_lahir"><?= $Page->renderSort($Page->tgl_lahir) ?></div></th>
<?php } ?>
<?php if ($Page->agama->Visible) { // agama ?>
        <th data-name="agama" class="<?= $Page->agama->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_agama" class="peserta_didik_agama"><?= $Page->renderSort($Page->agama) ?></div></th>
<?php } ?>
<?php if ($Page->status->Visible) { // status ?>
        <th data-name="status" class="<?= $Page->status->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_status" class="peserta_didik_status"><?= $Page->renderSort($Page->status) ?></div></th>
<?php } ?>
<?php if ($Page->sekolah_asal->Visible) { // sekolah_asal ?>
        <th data-name="sekolah_asal" class="<?= $Page->sekolah_asal->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_sekolah_asal" class="peserta_didik_sekolah_asal"><?= $Page->renderSort($Page->sekolah_asal) ?></div></th>
<?php } ?>
<?php if ($Page->diterima_di_kls->Visible) { // diterima_di_kls ?>
        <th data-name="diterima_di_kls" class="<?= $Page->diterima_di_kls->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_diterima_di_kls" class="peserta_didik_diterima_di_kls"><?= $Page->renderSort($Page->diterima_di_kls) ?></div></th>
<?php } ?>
<?php if ($Page->tanggal->Visible) { // tanggal ?>
        <th data-name="tanggal" class="<?= $Page->tanggal->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_peserta_didik_tanggal" class="peserta_didik_tanggal"><?= $Page->renderSort($Page->tanggal) ?></div></th>
<?php } ?>
<?php
// Render list options (header, right)
$Page->ListOptions->render("header", "right");
?>
    </tr>
</thead>
<tbody>
<?php
if ($Page->ExportAll && $Page->isExport()) {
    $Page->StopRecord = $Page->TotalRecords;
} else {
    // Set the last record to display
    if ($Page->TotalRecords > $Page->StartRecord + $Page->DisplayRecords - 1) {
        $Page->StopRecord = $Page->StartRecord + $Page->DisplayRecords - 1;
    } else {
        $Page->StopRecord = $Page->TotalRecords;
    }
}
$Page->RecordCount = $Page->StartRecord - 1;
if ($Page->Recordset && !$Page->Recordset->EOF) {
    // Nothing to do
} elseif (!$Page->AllowAddDeleteRow && $Page->StopRecord == 0) {
    $Page->StopRecord = $Page->GridAddRowCount;
}

// Initialize aggregate
$Page->RowType = ROWTYPE_AGGREGATEINIT;
$Page->resetAttributes();
$Page->renderRow();
while ($Page->RecordCount < $Page->StopRecord) {
    $Page->RecordCount++;
    if ($Page->RecordCount >= $Page->StartRecord) {
        $Page->RowCount++;

        // Set up key count
        $Page->KeyCount = $Page->RowIndex;

        // Init row class and style
        $Page->resetAttributes();
        $Page->CssClass = "";
        if ($Page->isGridAdd()) {
            $Page->loadRowValues(); // Load default values
            $Page->OldKey = "";
            $Page->setKey($Page->OldKey);
        } else {
            $Page->loadRowValues($Page->Recordset); // Load row values
            if ($Page->isGridEdit()) {
                $Page->OldKey = $Page->getKey(true); // Get from CurrentValue
                $Page->setKey($Page->OldKey);
            }
        }
        $Page->RowType = ROWTYPE_VIEW; // Render view

        // Set up row id / data-rowindex
        $Page->RowAttrs->merge(["data-rowindex" => $Page->RowCount, "id" => "r" . $Page->RowCount . "_peserta_didik", "data-rowtype" => $Page->RowType]);

        // Render row
        $Page->renderRow();

        // Render list options
        $Page->renderListOptions();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Page->ListOptions->render("body", "left", $Page->RowCount);
?>
    <?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <td data-name="kode_tapel" <?= $Page->kode_tapel->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_kode_tapel">
<span<?= $Page->kode_tapel->viewAttributes() ?>>
<?= $Page->kode_tapel->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->kelas->Visible) { // kelas ?>
        <td data-name="kelas" <?= $Page->kelas->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_kelas">
<span<?= $Page->kelas->viewAttributes() ?>>
<?= $Page->kelas->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->nisn->Visible) { // nisn ?>
        <td data-name="nisn" <?= $Page->nisn->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_nisn">
<span<?= $Page->nisn->viewAttributes() ?>>
<?= $Page->nisn->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->nis->Visible) { // nis ?>
        <td data-name="nis" <?= $Page->nis->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_nis">
<span<?= $Page->nis->viewAttributes() ?>>
<?= $Page->nis->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->nama->Visible) { // nama ?>
        <td data-name="nama" <?= $Page->nama->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_nama">
<span<?= $Page->nama->viewAttributes() ?>>
<?= $Page->nama->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->jk->Visible) { // jk ?>
        <td data-name="jk" <?= $Page->jk->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_jk">
<span<?= $Page->jk->viewAttributes() ?>>
<?= $Page->jk->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->tmp_lahir->Visible) { // tmp_lahir ?>
        <td data-name="tmp_lahir" <?= $Page->tmp_lahir->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_tmp_lahir">
<span<?= $Page->tmp_lahir->viewAttributes() ?>>
<?= $Page->tmp_lahir->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->tgl_lahir->Visible) { // tgl_lahir ?>
        <td data-name="tgl_lahir" <?= $Page->tgl_lahir->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_tgl_lahir">
<span<?= $Page->tgl_lahir->viewAttributes() ?>>
<?= $Page->tgl_lahir->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->agama->Visible) { // agama ?>
        <td data-name="agama" <?= $Page->agama->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_agama">
<span<?= $Page->agama->viewAttributes() ?>>
<?= $Page->agama->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->status->Visible) { // status ?>
        <td data-name="status" <?= $Page->status->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_status">
<span<?= $Page->status->viewAttributes() ?>>
<?= $Page->status->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->sekolah_asal->Visible) { // sekolah_asal ?>
        <td data-name="sekolah_asal" <?= $Page->sekolah_asal->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_sekolah_asal">
<span<?= $Page->sekolah_asal->viewAttributes() ?>>
<?= $Page->sekolah_asal->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->diterima_di_kls->Visible) { // diterima_di_kls ?>
        <td data-name="diterima_di_kls" <?= $Page->diterima_di_kls->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_diterima_di_kls">
<span<?= $Page->diterima_di_kls->viewAttributes() ?>>
<?= $Page->diterima_di_kls->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->tanggal->Visible) { // tanggal ?>
        <td data-name="tanggal" <?= $Page->tanggal->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_peserta_didik_tanggal">
<span<?= $Page->tanggal->viewAttributes() ?>>
<?= $Page->tanggal->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Page->ListOptions->render("body", "right", $Page->RowCount);
?>
    </tr>
<?php
    }
    if (!$Page->isGridAdd()) {
        $Page->Recordset->moveNext();
    }
}
?>
</tbody>
</table><!-- /.ew-table -->
<?php } ?>
</div><!-- /.ew-grid-middle-panel -->
<?php if (!$Page->CurrentAction) { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
</form><!-- /.ew-list-form -->
<?php
// Close recordset
if ($Page->Recordset) {
    $Page->Recordset->close();
}
?>
<?php if (!$Page->isExport()) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php if (!$Page->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?= CurrentPageUrl(false) ?>">
<?= $Page->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($Page->TotalRecords == 0 && !$Page->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<?php if (!$Page->isExport()) { ?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("peserta_didik");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php } ?>
