<?php

namespace PHPMaker2021\rdigital21;

// Page object
$DimensiDelete = &$Page;
?>
<script>
var currentForm, currentPageID;
var fdimensidelete;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "delete";
    fdimensidelete = currentForm = new ew.Form("fdimensidelete", "delete");
    loadjs.done("fdimensidelete");
});
</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.dimensi) ew.vars.tables.dimensi = <?= JsonEncode(GetClientVar("tables", "dimensi")) ?>;
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fdimensidelete" id="fdimensidelete" 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="dimensi">
<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->dimensi->Visible) { // dimensi ?>
        <th class="<?= $Page->dimensi->headerCellClass() ?>"><span id="elh_dimensi_dimensi" class="dimensi_dimensi"><?= $Page->dimensi->caption() ?></span></th>
<?php } ?>
<?php if ($Page->elemen->Visible) { // elemen ?>
        <th class="<?= $Page->elemen->headerCellClass() ?>"><span id="elh_dimensi_elemen" class="dimensi_elemen"><?= $Page->elemen->caption() ?></span></th>
<?php } ?>
<?php if ($Page->sub_elemen->Visible) { // sub_elemen ?>
        <th class="<?= $Page->sub_elemen->headerCellClass() ?>"><span id="elh_dimensi_sub_elemen" class="dimensi_sub_elemen"><?= $Page->sub_elemen->caption() ?></span></th>
<?php } ?>
<?php if ($Page->fase_capaian_d->Visible) { // fase_capaian_d ?>
        <th class="<?= $Page->fase_capaian_d->headerCellClass() ?>"><span id="elh_dimensi_fase_capaian_d" class="dimensi_fase_capaian_d"><?= $Page->fase_capaian_d->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->dimensi->Visible) { // dimensi ?>
        <td <?= $Page->dimensi->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_dimensi_dimensi" class="dimensi_dimensi">
<span<?= $Page->dimensi->viewAttributes() ?>>
<?= $Page->dimensi->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->elemen->Visible) { // elemen ?>
        <td <?= $Page->elemen->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_dimensi_elemen" class="dimensi_elemen">
<span<?= $Page->elemen->viewAttributes() ?>>
<?= $Page->elemen->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->sub_elemen->Visible) { // sub_elemen ?>
        <td <?= $Page->sub_elemen->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_dimensi_sub_elemen" class="dimensi_sub_elemen">
<span<?= $Page->sub_elemen->viewAttributes() ?>>
<?= $Page->sub_elemen->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->fase_capaian_d->Visible) { // fase_capaian_d ?>
        <td <?= $Page->fase_capaian_d->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_dimensi_fase_capaian_d" class="dimensi_fase_capaian_d">
<span<?= $Page->fase_capaian_d->viewAttributes() ?>>
<?= $Page->fase_capaian_d->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>
