<?php

namespace PHPMaker2023\Jack_Jill_school;

// Page object
$TasksView = &$Page;
?>
<?php if (!$Page->isExport()) { ?>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<?php } ?>
<?php if (!$Page->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php $Page->ExportOptions->render("body") ?>
<?php $Page->OtherOptions->render("body") ?>
</div>
<?php } ?>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<main class="view">
<?php if (!$Page->IsModal) { ?>
<?php if (!$Page->isExport()) { ?>
<?= $Page->Pager->render() ?>
<?php } ?>
<?php } ?>
<?php if (!$Page->IsModal) { ?>
<div class="col-md-12">
  <div class="card shadow-sm">
    <div class="card-header">
	  <h4 class="card-title"><?php echo Language()->phrase("ViewCaption"); ?></h4>
	  <div class="card-tools">
	  <button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i>
	  </button>
	  </div>
	  <!-- /.card-tools -->
    </div>
    <!-- /.card-header -->
    <div class="card-body">
<?php } ?>
<form name="ftasksview" id="ftasksview" class="ew-form ew-view-form overlay-wrapper" action="<?= CurrentPageUrl(false) ?>" method="post" novalidate autocomplete="on">
<?php if (!$Page->isExport()) { ?>
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { tasks: currentTable } });
var currentPageID = ew.PAGE_ID = "view";
var currentForm;
var ftasksview;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

    // Form object
    let form = new ew.FormBuilder()
        .setId("ftasksview")
        .setPageId("view")
        .build();
    window[form.id] = form;
    currentForm = form;
    loadjs.done(form.id);
});
</script>
<?php } ?>
<?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="tasks">
<input type="hidden" name="modal" value="<?= (int)$Page->IsModal ?>">
<table class="<?= $Page->TableClass ?>">
<?php if ($Page->TaskID->Visible) { // TaskID ?>
    <tr id="r_TaskID"<?= $Page->TaskID->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_TaskID"><?= $Page->TaskID->caption() ?></span></td>
        <td data-name="TaskID"<?= $Page->TaskID->cellAttributes() ?>>
<span id="el_tasks_TaskID">
<span<?= $Page->TaskID->viewAttributes() ?>>
<?= $Page->TaskID->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->TaskName->Visible) { // TaskName ?>
    <tr id="r_TaskName"<?= $Page->TaskName->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_TaskName"><?= $Page->TaskName->caption() ?></span></td>
        <td data-name="TaskName"<?= $Page->TaskName->cellAttributes() ?>>
<span id="el_tasks_TaskName">
<span<?= $Page->TaskName->viewAttributes() ?>>
<?= $Page->TaskName->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->ResourceID->Visible) { // ResourceID ?>
    <tr id="r_ResourceID"<?= $Page->ResourceID->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_ResourceID"><?= $Page->ResourceID->caption() ?></span></td>
        <td data-name="ResourceID"<?= $Page->ResourceID->cellAttributes() ?>>
<span id="el_tasks_ResourceID">
<span<?= $Page->ResourceID->viewAttributes() ?>>
<?= $Page->ResourceID->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->Start->Visible) { // Start ?>
    <tr id="r_Start"<?= $Page->Start->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_Start"><?= $Page->Start->caption() ?></span></td>
        <td data-name="Start"<?= $Page->Start->cellAttributes() ?>>
<span id="el_tasks_Start">
<span<?= $Page->Start->viewAttributes() ?>>
<?= $Page->Start->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->End->Visible) { // End ?>
    <tr id="r_End"<?= $Page->End->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_End"><?= $Page->End->caption() ?></span></td>
        <td data-name="End"<?= $Page->End->cellAttributes() ?>>
<span id="el_tasks_End">
<span<?= $Page->End->viewAttributes() ?>>
<?= $Page->End->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->Description->Visible) { // Description ?>
    <tr id="r_Description"<?= $Page->Description->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_Description"><?= $Page->Description->caption() ?></span></td>
        <td data-name="Description"<?= $Page->Description->cellAttributes() ?>>
<span id="el_tasks_Description">
<span<?= $Page->Description->viewAttributes() ?>>
<?= $Page->Description->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->Milestone->Visible) { // Milestone ?>
    <tr id="r_Milestone"<?= $Page->Milestone->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_Milestone"><?= $Page->Milestone->caption() ?></span></td>
        <td data-name="Milestone"<?= $Page->Milestone->cellAttributes() ?>>
<span id="el_tasks_Milestone">
<span<?= $Page->Milestone->viewAttributes() ?>>
<?= $Page->Milestone->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->Duration->Visible) { // Duration ?>
    <tr id="r_Duration"<?= $Page->Duration->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_Duration"><?= $Page->Duration->caption() ?></span></td>
        <td data-name="Duration"<?= $Page->Duration->cellAttributes() ?>>
<span id="el_tasks_Duration">
<span<?= $Page->Duration->viewAttributes() ?>>
<?= $Page->Duration->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->PercentComplete->Visible) { // PercentComplete ?>
    <tr id="r_PercentComplete"<?= $Page->PercentComplete->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_PercentComplete"><?= $Page->PercentComplete->caption() ?></span></td>
        <td data-name="PercentComplete"<?= $Page->PercentComplete->cellAttributes() ?>>
<span id="el_tasks_PercentComplete">
<span<?= $Page->PercentComplete->viewAttributes() ?>>
<?= $Page->PercentComplete->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
<?php if ($Page->Dependencies->Visible) { // Dependencies ?>
    <tr id="r_Dependencies"<?= $Page->Dependencies->rowAttributes() ?>>
        <td class="<?= $Page->TableLeftColumnClass ?>"><span id="elh_tasks_Dependencies"><?= $Page->Dependencies->caption() ?></span></td>
        <td data-name="Dependencies"<?= $Page->Dependencies->cellAttributes() ?>>
<span id="el_tasks_Dependencies">
<span<?= $Page->Dependencies->viewAttributes() ?>>
<?= $Page->Dependencies->getViewValue() ?></span>
</span>
</td>
    </tr>
<?php } ?>
</table>
<div class="clearfix">&nbsp;</div>
</form>
<?php if (!$Page->IsModal) { ?>
		</div>
     <!-- /.card-body -->
     </div>
  <!-- /.card -->
</div>
<?php } ?>
<?php if (!$Page->IsModal) { ?>
<?php if (!$Page->isExport()) { ?>
<?= $Page->Pager->render() ?>
<?php } ?>
<?php } ?>
</main>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<?php if (!$Page->isExport()) { ?>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(ftasksadd.validateFields()){ew.prompt({title: ew.language.phrase("MessageAddConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#ftasksadd").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(ftasksedit.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#ftasksedit").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php } ?>
