<?php

namespace ProjectManagement\prjProjectManagement;

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

    // Form object
    let form = new ew.FormBuilder()
        .setId("fprojectproblemsdelete")
        .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="fprojectproblemsdelete" id="fprojectproblemsdelete" class="ew-form ew-delete-form" action="<?= CurrentPageUrl(false) ?>" method="post" 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="projectproblems">
<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->ProblemDate->Visible) { // ProblemDate ?>
        <th class="<?= $Page->ProblemDate->headerCellClass() ?>"><span id="elh_projectproblems_ProblemDate" class="projectproblems_ProblemDate"><?= $Page->ProblemDate->caption() ?></span></th>
<?php } ?>
<?php if ($Page->ProblemDescription->Visible) { // ProblemDescription ?>
        <th class="<?= $Page->ProblemDescription->headerCellClass() ?>"><span id="elh_projectproblems_ProblemDescription" class="projectproblems_ProblemDescription"><?= $Page->ProblemDescription->caption() ?></span></th>
<?php } ?>
<?php if ($Page->SolutionDescription->Visible) { // SolutionDescription ?>
        <th class="<?= $Page->SolutionDescription->headerCellClass() ?>"><span id="elh_projectproblems_SolutionDescription" class="projectproblems_SolutionDescription"><?= $Page->SolutionDescription->caption() ?></span></th>
<?php } ?>
<?php if ($Page->AriseById->Visible) { // AriseById ?>
        <th class="<?= $Page->AriseById->headerCellClass() ?>"><span id="elh_projectproblems_AriseById" class="projectproblems_AriseById"><?= $Page->AriseById->caption() ?></span></th>
<?php } ?>
<?php if ($Page->SolvedById->Visible) { // SolvedById ?>
        <th class="<?= $Page->SolvedById->headerCellClass() ?>"><span id="elh_projectproblems_SolvedById" class="projectproblems_SolvedById"><?= $Page->SolvedById->caption() ?></span></th>
<?php } ?>
<?php if ($Page->ProblemFile->Visible) { // ProblemFile ?>
        <th class="<?= $Page->ProblemFile->headerCellClass() ?>"><span id="elh_projectproblems_ProblemFile" class="projectproblems_ProblemFile"><?= $Page->ProblemFile->caption() ?></span></th>
<?php } ?>
<?php if ($Page->_ProjectID->Visible) { // ProjectID ?>
        <th class="<?= $Page->_ProjectID->headerCellClass() ?>"><span id="elh_projectproblems__ProjectID" class="projectproblems__ProjectID"><?= $Page->_ProjectID->caption() ?></span></th>
<?php } ?>
<?php if ($Page->Created_Date->Visible) { // Created_Date ?>
        <th class="<?= $Page->Created_Date->headerCellClass() ?>"><span id="elh_projectproblems_Created_Date" class="projectproblems_Created_Date"><?= $Page->Created_Date->caption() ?></span></th>
<?php } ?>
<?php if ($Page->Created_By->Visible) { // Created_By ?>
        <th class="<?= $Page->Created_By->headerCellClass() ?>"><span id="elh_projectproblems_Created_By" class="projectproblems_Created_By"><?= $Page->Created_By->caption() ?></span></th>
<?php } ?>
<?php if ($Page->Last_Updated_Date->Visible) { // Last_Updated_Date ?>
        <th class="<?= $Page->Last_Updated_Date->headerCellClass() ?>"><span id="elh_projectproblems_Last_Updated_Date" class="projectproblems_Last_Updated_Date"><?= $Page->Last_Updated_Date->caption() ?></span></th>
<?php } ?>
<?php if ($Page->Last_Updated_By->Visible) { // Last_Updated_By ?>
        <th class="<?= $Page->Last_Updated_By->headerCellClass() ?>"><span id="elh_projectproblems_Last_Updated_By" class="projectproblems_Last_Updated_By"><?= $Page->Last_Updated_By->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->ProblemDate->Visible) { // ProblemDate ?>
        <td<?= $Page->ProblemDate->cellAttributes() ?>>
<span id="">
<span<?= $Page->ProblemDate->viewAttributes() ?>>
<?= $Page->ProblemDate->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->ProblemDescription->Visible) { // ProblemDescription ?>
        <td<?= $Page->ProblemDescription->cellAttributes() ?>>
<span id="">
<span<?= $Page->ProblemDescription->viewAttributes() ?>>
<?= $Page->ProblemDescription->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->SolutionDescription->Visible) { // SolutionDescription ?>
        <td<?= $Page->SolutionDescription->cellAttributes() ?>>
<span id="">
<span<?= $Page->SolutionDescription->viewAttributes() ?>>
<?= $Page->SolutionDescription->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->AriseById->Visible) { // AriseById ?>
        <td<?= $Page->AriseById->cellAttributes() ?>>
<span id="">
<span<?= $Page->AriseById->viewAttributes() ?>>
<?= $Page->AriseById->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->SolvedById->Visible) { // SolvedById ?>
        <td<?= $Page->SolvedById->cellAttributes() ?>>
<span id="">
<span<?= $Page->SolvedById->viewAttributes() ?>>
<?= $Page->SolvedById->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->ProblemFile->Visible) { // ProblemFile ?>
        <td<?= $Page->ProblemFile->cellAttributes() ?>>
<span id="">
<span<?= $Page->ProblemFile->viewAttributes() ?>>
<?= GetFileViewTag($Page->ProblemFile, $Page->ProblemFile->getViewValue(), false) ?>
</span>
</span>
</td>
<?php } ?>
<?php if ($Page->_ProjectID->Visible) { // ProjectID ?>
        <td<?= $Page->_ProjectID->cellAttributes() ?>>
<span id="">
<span<?= $Page->_ProjectID->viewAttributes() ?>>
<?= $Page->_ProjectID->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->Created_Date->Visible) { // Created_Date ?>
        <td<?= $Page->Created_Date->cellAttributes() ?>>
<span id="">
<span<?= $Page->Created_Date->viewAttributes() ?>>
<?= $Page->Created_Date->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->Created_By->Visible) { // Created_By ?>
        <td<?= $Page->Created_By->cellAttributes() ?>>
<span id="">
<span<?= $Page->Created_By->viewAttributes() ?>>
<?= $Page->Created_By->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->Last_Updated_Date->Visible) { // Last_Updated_Date ?>
        <td<?= $Page->Last_Updated_Date->cellAttributes() ?>>
<span id="">
<span<?= $Page->Last_Updated_Date->viewAttributes() ?>>
<?= $Page->Last_Updated_Date->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->Last_Updated_By->Visible) { // Last_Updated_By ?>
        <td<?= $Page->Last_Updated_By->cellAttributes() ?>>
<span id="">
<span<?= $Page->Last_Updated_By->viewAttributes() ?>>
<?= $Page->Last_Updated_By->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>
