<?php

namespace PHPMaker2021\rkm21;

// Page object
$MataPelajaranDelete = &$Page;
?>
<script>
var currentForm, currentPageID;
var fmata_pelajarandelete;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "delete";
    fmata_pelajarandelete = currentForm = new ew.Form("fmata_pelajarandelete", "delete");
    loadjs.done("fmata_pelajarandelete");
});
</script>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<script>
if (!ew.vars.tables.mata_pelajaran) ew.vars.tables.mata_pelajaran = <?= JsonEncode(GetClientVar("tables", "mata_pelajaran")) ?>;
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fmata_pelajarandelete" id="fmata_pelajarandelete" class="form-inline ew-form ew-delete-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="mata_pelajaran">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($Page->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("COMPOSITE_KEY_SEPARATOR"), $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?= HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid">
<div class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
    <thead>
    <tr class="ew-table-header">
<?php if ($Page->mata_pelajaran->Visible) { // mata_pelajaran ?>
        <th class="<?= $Page->mata_pelajaran->headerCellClass() ?>"><span id="elh_mata_pelajaran_mata_pelajaran" class="mata_pelajaran_mata_pelajaran"><?= $Page->mata_pelajaran->caption() ?></span></th>
<?php } ?>
<?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
        <th class="<?= $Page->kode_mapel->headerCellClass() ?>"><span id="elh_mata_pelajaran_kode_mapel" class="mata_pelajaran_kode_mapel"><?= $Page->kode_mapel->caption() ?></span></th>
<?php } ?>
<?php if ($Page->ket->Visible) { // ket ?>
        <th class="<?= $Page->ket->headerCellClass() ?>"><span id="elh_mata_pelajaran_ket" class="mata_pelajaran_ket"><?= $Page->ket->caption() ?></span></th>
<?php } ?>
    </tr>
    </thead>
    <tbody>
<?php
$Page->RecordCount = 0;
$i = 0;
while (!$Page->Recordset->EOF) {
    $Page->RecordCount++;
    $Page->RowCount++;

    // Set row properties
    $Page->resetAttributes();
    $Page->RowType = ROWTYPE_VIEW; // View

    // Get the field contents
    $Page->loadRowValues($Page->Recordset);

    // Render row
    $Page->renderRow();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php if ($Page->mata_pelajaran->Visible) { // mata_pelajaran ?>
        <td <?= $Page->mata_pelajaran->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_mata_pelajaran_mata_pelajaran" class="mata_pelajaran_mata_pelajaran">
<span<?= $Page->mata_pelajaran->viewAttributes() ?>>
<?= $Page->mata_pelajaran->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
        <td <?= $Page->kode_mapel->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_mata_pelajaran_kode_mapel" class="mata_pelajaran_kode_mapel">
<span<?= $Page->kode_mapel->viewAttributes() ?>>
<?= $Page->kode_mapel->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->ket->Visible) { // ket ?>
        <td <?= $Page->ket->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_mata_pelajaran_ket" class="mata_pelajaran_ket">
<span<?= $Page->ket->viewAttributes() ?>>
<?= $Page->ket->getViewValue() ?></span>
</span>
</td>
<?php } ?>
    </tr>
<?php
    $Page->Recordset->moveNext();
}
$Page->Recordset->close();
?>
</tbody>
</table>
</div>
</div>
<div>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?= $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?= HtmlEncode(GetUrl($Page->getReturnUrl())) ?>"><?= $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
