<?php

namespace PHPMaker2021\gudang_ubi;

// Page object
$SupDelete = &$Page;
?>
<script>
var currentForm, currentPageID;
var fsupdelete;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "delete";
    fsupdelete = currentForm = new ew.Form("fsupdelete", "delete");
    loadjs.done("fsupdelete");
});
</script>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fsupdelete" id="fsupdelete" class="form-inline ew-form ew-delete-form" action="<?= CurrentPageUrl() ?>" 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="sup">
<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->sup_id->Visible) { // sup_id ?>
        <th class="<?= $Page->sup_id->headerCellClass() ?>"><span id="elh_sup_sup_id" class="sup_sup_id"><?= $Page->sup_id->caption() ?></span></th>
<?php } ?>
<?php if ($Page->sup_nama->Visible) { // sup_nama ?>
        <th class="<?= $Page->sup_nama->headerCellClass() ?>"><span id="elh_sup_sup_nama" class="sup_sup_nama"><?= $Page->sup_nama->caption() ?></span></th>
<?php } ?>
<?php if ($Page->sup_alamat->Visible) { // sup_alamat ?>
        <th class="<?= $Page->sup_alamat->headerCellClass() ?>"><span id="elh_sup_sup_alamat" class="sup_sup_alamat"><?= $Page->sup_alamat->caption() ?></span></th>
<?php } ?>
<?php if ($Page->sup_hp->Visible) { // sup_hp ?>
        <th class="<?= $Page->sup_hp->headerCellClass() ?>"><span id="elh_sup_sup_hp" class="sup_sup_hp"><?= $Page->sup_hp->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->sup_id->Visible) { // sup_id ?>
        <td <?= $Page->sup_id->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_sup_sup_id" class="sup_sup_id">
<span<?= $Page->sup_id->viewAttributes() ?>>
<?= $Page->sup_id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->sup_nama->Visible) { // sup_nama ?>
        <td <?= $Page->sup_nama->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_sup_sup_nama" class="sup_sup_nama">
<span<?= $Page->sup_nama->viewAttributes() ?>>
<?= $Page->sup_nama->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->sup_alamat->Visible) { // sup_alamat ?>
        <td <?= $Page->sup_alamat->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_sup_sup_alamat" class="sup_sup_alamat">
<span<?= $Page->sup_alamat->viewAttributes() ?>>
<?= $Page->sup_alamat->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->sup_hp->Visible) { // sup_hp ?>
        <td <?= $Page->sup_hp->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_sup_sup_hp" class="sup_sup_hp">
<span<?= $Page->sup_hp->viewAttributes() ?>>
<?= $Page->sup_hp->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="<?= 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>
