<?php

namespace PHPMaker2024\laundrytech;

// Page object
$OrdercontainersDelete = &$Page;
?>
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { ordercontainers: currentTable } });
var currentPageID = ew.PAGE_ID = "delete";
var currentForm;
var fordercontainersdelete;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

    // Form object
    let form = new ew.FormBuilder()
        .setId("fordercontainersdelete")
        .setPageId("delete")
        .build();
    window[form.id] = form;
    currentForm = form;
    loadjs.done(form.id);
});
</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="fordercontainersdelete" id="fordercontainersdelete" class="ew-form ew-delete-form" action="<?= CurrentPageUrl(false) ?>" method="post" novalidate autocomplete="off">
<?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="ordercontainers">
<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 <?= $Page->TableGridClass ?>">
<div class="card-body ew-grid-middle-panel <?= $Page->TableContainerClass ?>" style="<?= $Page->TableContainerStyle ?>">
<table class="<?= $Page->TableClass ?>">
    <thead>
    <tr class="ew-table-header">
<?php if ($Page->orderContainerId->Visible) { // orderContainerId ?>
        <th class="<?= $Page->orderContainerId->headerCellClass() ?>"><span id="elh_ordercontainers_orderContainerId" class="ordercontainers_orderContainerId"><?= $Page->orderContainerId->caption() ?></span></th>
<?php } ?>
<?php if ($Page->orderId->Visible) { // orderId ?>
        <th class="<?= $Page->orderId->headerCellClass() ?>"><span id="elh_ordercontainers_orderId" class="ordercontainers_orderId"><?= $Page->orderId->caption() ?></span></th>
<?php } ?>
<?php if ($Page->ContainerType->Visible) { // ContainerType ?>
        <th class="<?= $Page->ContainerType->headerCellClass() ?>"><span id="elh_ordercontainers_ContainerType" class="ordercontainers_ContainerType"><?= $Page->ContainerType->caption() ?></span></th>
<?php } ?>
<?php if ($Page->NoOfContainers->Visible) { // NoOfContainers ?>
        <th class="<?= $Page->NoOfContainers->headerCellClass() ?>"><span id="elh_ordercontainers_NoOfContainers" class="ordercontainers_NoOfContainers"><?= $Page->NoOfContainers->caption() ?></span></th>
<?php } ?>
<?php if ($Page->containerPhoto->Visible) { // containerPhoto ?>
        <th class="<?= $Page->containerPhoto->headerCellClass() ?>"><span id="elh_ordercontainers_containerPhoto" class="ordercontainers_containerPhoto"><?= $Page->containerPhoto->caption() ?></span></th>
<?php } ?>
<?php if ($Page->containerId->Visible) { // containerId ?>
        <th class="<?= $Page->containerId->headerCellClass() ?>"><span id="elh_ordercontainers_containerId" class="ordercontainers_containerId"><?= $Page->containerId->caption() ?></span></th>
<?php } ?>
    </tr>
    </thead>
    <tbody>
<?php
$Page->RecordCount = 0;
$i = 0;
while ($Page->fetch()) {
    $Page->RecordCount++;
    $Page->RowCount++;

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

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

    // Render row
    $Page->renderRow();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php if ($Page->orderContainerId->Visible) { // orderContainerId ?>
        <td<?= $Page->orderContainerId->cellAttributes() ?>>
<span id="">
<span<?= $Page->orderContainerId->viewAttributes() ?>>
<?= $Page->orderContainerId->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->orderId->Visible) { // orderId ?>
        <td<?= $Page->orderId->cellAttributes() ?>>
<span id="">
<span<?= $Page->orderId->viewAttributes() ?>>
<?= $Page->orderId->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->ContainerType->Visible) { // ContainerType ?>
        <td<?= $Page->ContainerType->cellAttributes() ?>>
<span id="">
<span<?= $Page->ContainerType->viewAttributes() ?>>
<?= $Page->ContainerType->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->NoOfContainers->Visible) { // NoOfContainers ?>
        <td<?= $Page->NoOfContainers->cellAttributes() ?>>
<span id="">
<span<?= $Page->NoOfContainers->viewAttributes() ?>>
<?= $Page->NoOfContainers->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->containerPhoto->Visible) { // containerPhoto ?>
        <td<?= $Page->containerPhoto->cellAttributes() ?>>
<span id="">
<span<?= $Page->containerPhoto->viewAttributes() ?>>
<?php if (!EmptyString($Page->containerPhoto->getViewValue()) && $Page->containerPhoto->linkAttributes() != "") { ?>
<a<?= $Page->containerPhoto->linkAttributes() ?>><?= $Page->containerPhoto->getViewValue() ?></a>
<?php } else { ?>
<?= $Page->containerPhoto->getViewValue() ?>
<?php } ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($Page->containerId->Visible) { // containerId ?>
        <td<?= $Page->containerId->cellAttributes() ?>>
<span id="">
<span<?= $Page->containerId->viewAttributes() ?>>
<?= $Page->containerId->getViewValue() ?></span>
</span>
</td>
<?php } ?>
    </tr>
<?php
}
$Page->Recordset?->free();
?>
</tbody>
</table>
</div>
</div>
<div class="ew-buttons ew-desktop-buttons">
<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>
