<?php

namespace PHPMaker2021\rdigital21;

// Page object
$NilaiFormatifList = &$Page;
?>
<?php if (!$Page->isExport()) { ?>
<script>
var currentForm, currentPageID;
var fnilai_formatiflist;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "list";
    fnilai_formatiflist = currentForm = new ew.Form("fnilai_formatiflist", "list");
    fnilai_formatiflist.formKeyCountName = '<?= $Page->FormKeyCountName ?>';
    loadjs.done("fnilai_formatiflist");
});
var fnilai_formatiflistsrch, currentSearchForm, currentAdvancedSearchForm;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object for search
    fnilai_formatiflistsrch = currentSearchForm = new ew.Form("fnilai_formatiflistsrch");

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "nilai_formatif")) ?>,
        fields = currentTable.fields;
    fnilai_formatiflistsrch.addFields([
        ["nilai_f_id", [], fields.nilai_f_id.isInvalid],
        ["guru_id", [], fields.guru_id.isInvalid],
        ["kode_mapel", [], fields.kode_mapel.isInvalid],
        ["kelas", [], fields.kelas.isInvalid],
        ["nama", [], fields.nama.isInvalid],
        ["jk", [], fields.jk.isInvalid],
        ["f1", [], fields.f1.isInvalid],
        ["f2", [], fields.f2.isInvalid],
        ["f3", [], fields.f3.isInvalid],
        ["f4", [], fields.f4.isInvalid],
        ["f5", [], fields.f5.isInvalid],
        ["f6", [], fields.f6.isInvalid],
        ["f7", [], fields.f7.isInvalid],
        ["f8", [], fields.f8.isInvalid],
        ["f9", [], fields.f9.isInvalid],
        ["f10", [], fields.f10.isInvalid],
        ["f11", [], fields.f11.isInvalid],
        ["f12", [], fields.f12.isInvalid],
        ["f13", [], fields.f13.isInvalid],
        ["f14", [], fields.f14.isInvalid],
        ["f15", [], fields.f15.isInvalid],
        ["naf", [], fields.naf.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        fnilai_formatiflistsrch.setInvalid();
    });

    // Validate form
    fnilai_formatiflistsrch.validate = function () {
        if (!this.validateRequired)
            return true; // Ignore validation
        var fobj = this.getForm(),
            $fobj = $(fobj),
            rowIndex = "";
        $fobj.data("rowindex", rowIndex);

        // Validate fields
        if (!this.validateFields(rowIndex))
            return false;

        // Call Form_CustomValidate event
        if (!this.customValidate(fobj)) {
            this.focus();
            return false;
        }
        return true;
    }

    // Form_CustomValidate
    fnilai_formatiflistsrch.customValidate = function(fobj) { // DO NOT CHANGE THIS LINE!
        // Your custom validation code here, return false if invalid.
        return true;
    }

    // Use JavaScript validation or not
    fnilai_formatiflistsrch.validateRequired = <?= Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

    // Dynamic selection lists
    fnilai_formatiflistsrch.lists.kode_mapel = <?= $Page->kode_mapel->toClientList($Page) ?>;
    fnilai_formatiflistsrch.lists.kelas = <?= $Page->kelas->toClientList($Page) ?>;

    // Filters
    fnilai_formatiflistsrch.filterList = <?= $Page->getFilterList() ?>;

    // Init search panel as collapsed
    fnilai_formatiflistsrch.initSearchPanel = true;
    loadjs.done("fnilai_formatiflistsrch");
});
</script>
<script>
loadjs.ready("head", function () {
    // Client script
    $(document).ready((function(){$("#x_f1, #x_f2, #x_f3, #x_f4, #x_f5, #x_f6, #x_f7, #x_f8, #x_f9, #x_f10, #x_f11, #x_f12, #x_f13, #x_f14, #x_f15, #x_f16, #x_f17, #x_f18, #x_f19, #x_f20, #x_f21, #x_f22, #x_f23, #x_f24, #x_f25, #x_f26, #x_f27, #x_f28, #x_f29, #x_f30").change((function(){for(var f=[parseInt($("#x_f1").val())||0,parseInt($("#x_f2").val())||0,parseInt($("#x_f3").val())||0,parseInt($("#x_f4").val())||0,parseInt($("#x_f5").val())||0,parseInt($("#x_f6").val())||0,parseInt($("#x_f7").val())||0,parseInt($("#x_f8").val())||0,parseInt($("#x_f9").val())||0,parseInt($("#x_f10").val())||0,parseInt($("#x_f11").val())||0,parseInt($("#x_f12").val())||0,parseInt($("#x_f13").val())||0,parseInt($("#x_f14").val())||0,parseInt($("#x_f15").val())||0],x=0,_=0,a=0;a<f.length;a++)0!==f[a]&&(x+=f[a],_++);var n=_>0?(x/_).toFixed(0):0;$("#x_naf").val(n)}))}));
});
</script>
<?php } ?>
<?php if (!$Page->isExport()) { ?>
<div class="btn-toolbar ew-toolbar">
<?php if ($Page->TotalRecords > 0 && $Page->ExportOptions->visible()) { ?>
<?php $Page->ExportOptions->render("body") ?>
<?php } ?>
<?php if ($Page->ImportOptions->visible()) { ?>
<?php $Page->ImportOptions->render("body") ?>
<?php } ?>
<?php if ($Page->SearchOptions->visible()) { ?>
<?php $Page->SearchOptions->render("body") ?>
<?php } ?>
<?php if ($Page->FilterOptions->visible()) { ?>
<?php $Page->FilterOptions->render("body") ?>
<?php } ?>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php if (!$Page->isExport() || Config("EXPORT_MASTER_RECORD") && $Page->isExport("print")) { ?>
<?php
if ($Page->DbMasterFilter != "" && $Page->getCurrentMasterTable() == "penilaian") {
    if ($Page->MasterRecordExists) {
        include_once "views/PenilaianMaster.php";
    }
}
?>
<?php } ?>
<?php
$Page->renderOtherOptions();
?>
<?php if ($Security->canSearch()) { ?>
<?php if (!$Page->isExport() && !$Page->CurrentAction) { ?>
<form name="fnilai_formatiflistsrch" id="fnilai_formatiflistsrch" class="form-inline ew-form ew-ext-search-form" action="<?= CurrentPageUrl(false) ?>">
<div id="fnilai_formatiflistsrch-search-panel" class="<?= $Page->SearchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="nilai_formatif">
    <div class="ew-extended-search">
<?php
// Render search row
$Page->RowType = ROWTYPE_SEARCH;
$Page->resetAttributes();
$Page->renderRow();
?>
<?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
    <?php
        $Page->SearchColumnCount++;
        if (($Page->SearchColumnCount - 1) % $Page->SearchFieldsPerRow == 0) {
            $Page->SearchRowCount++;
    ?>
<div id="xsr_<?= $Page->SearchRowCount ?>" class="ew-row d-sm-flex d-none">
    <?php
        }
     ?>
    <div id="xsc_kode_mapel" class="ew-cell form-group">
        <template id="tpsc_nilai_formatif_kode_mapel"><label for="x_kode_mapel" class="ew-search-caption ew-label"><?= $Page->kode_mapel->caption() ?></label></template>
        <template id="tpz_nilai_formatif_kode_mapel"><span class="ew-search-operator">
<?= $Language->phrase("LIKE") ?>
<input type="hidden" name="z_kode_mapel" id="z_kode_mapel" value="LIKE">
</span></template>
        <template id="tpx_nilai_formatif_kode_mapel"><span id="el_nilai_formatif_kode_mapel" class="ew-search-field">
    <select
        id="x_kode_mapel"
        name="x_kode_mapel"
        class="form-control ew-select<?= $Page->kode_mapel->isInvalidClass() ?>"
        data-select2-id="nilai_formatif_x_kode_mapel"
        data-table="nilai_formatif"
        data-field="x_kode_mapel"
        data-value-separator="<?= $Page->kode_mapel->displayValueSeparatorAttribute() ?>"
        <?= $Page->kode_mapel->editAttributes() ?>>
        <?= $Page->kode_mapel->selectOptionListHtml("x_kode_mapel") ?>
    </select>
    <div class="invalid-feedback"><?= $Page->kode_mapel->getErrorMessage(false) ?></div>
<?= $Page->kode_mapel->Lookup->getParamTag($Page, "p_x_kode_mapel") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='nilai_formatif_x_kode_mapel']"),
        options = { name: "x_kode_mapel", selectId: "nilai_formatif_x_kode_mapel", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.nilai_formatif.fields.kode_mapel.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
        <template id="tpv_nilai_formatif_kode_mapel">
        </template>
    </div>
    <?php if ($Page->SearchColumnCount % $Page->SearchFieldsPerRow == 0) { ?>
</div>
    <?php } ?>
<?php } ?>
<?php if ($Page->kelas->Visible) { // kelas ?>
    <?php
        $Page->SearchColumnCount++;
        if (($Page->SearchColumnCount - 1) % $Page->SearchFieldsPerRow == 0) {
            $Page->SearchRowCount++;
    ?>
<div id="xsr_<?= $Page->SearchRowCount ?>" class="ew-row d-sm-flex d-none">
    <?php
        }
     ?>
    <div id="xsc_kelas" class="ew-cell form-group">
        <template id="tpsc_nilai_formatif_kelas"><label for="x_kelas" class="ew-search-caption ew-label"><?= $Page->kelas->caption() ?></label></template>
        <template id="tpz_nilai_formatif_kelas"><span class="ew-search-operator">
<?= $Language->phrase("LIKE") ?>
<input type="hidden" name="z_kelas" id="z_kelas" value="LIKE">
</span></template>
        <template id="tpx_nilai_formatif_kelas"><span id="el_nilai_formatif_kelas" class="ew-search-field">
<?php if (!$Security->isAdmin() && $Security->isLoggedIn() && !$Page->userIDAllow($Page->CurrentAction)) { // Non system admin ?>
<span<?= $Page->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kelas->getDisplayValue($Page->kelas->EditValue))) ?>"></span>
<input type="hidden" data-table="nilai_formatif" data-field="x_kelas" data-hidden="1" name="x_kelas" id="x_kelas" value="<?= HtmlEncode($Page->kelas->AdvancedSearch->SearchValue) ?>">
<?php } else { ?>
    <select
        id="x_kelas"
        name="x_kelas"
        class="form-control ew-select<?= $Page->kelas->isInvalidClass() ?>"
        data-select2-id="nilai_formatif_x_kelas"
        data-table="nilai_formatif"
        data-field="x_kelas"
        data-value-separator="<?= $Page->kelas->displayValueSeparatorAttribute() ?>"
        <?= $Page->kelas->editAttributes() ?>>
        <?= $Page->kelas->selectOptionListHtml("x_kelas") ?>
    </select>
    <div class="invalid-feedback"><?= $Page->kelas->getErrorMessage(false) ?></div>
<?= $Page->kelas->Lookup->getParamTag($Page, "p_x_kelas") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='nilai_formatif_x_kelas']"),
        options = { name: "x_kelas", selectId: "nilai_formatif_x_kelas", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.nilai_formatif.fields.kelas.selectOptions);
    ew.createSelect(options);
});
</script>
<?php } ?>
</span></template>
        <template id="tpv_nilai_formatif_kelas">
        </template>
    </div>
    <?php if ($Page->SearchColumnCount % $Page->SearchFieldsPerRow == 0) { ?>
</div>
    <?php } ?>
<?php } ?>
    <?php if ($Page->SearchColumnCount % $Page->SearchFieldsPerRow > 0) { ?>
</div>
    <?php } ?>
<div id="tpsd_nilai_formatiflist" class="ew-custom-template-search"></div>
<template id="tpsm_nilai_formatiflist">
<div id="nilai_formatiflist"><div class="card card-warning card-outline card-body">
    <div id="r_kode_mapel" class="form-group row">
        <label for="x_kode_mapel" class="col-sm-3 col-form-label"><?= $Page->kode_mapel->caption() ?></label>
        <div class="col-sm-8"><slot class="ew-slot" name="tpx_nilai_formatif_kode_mapel"></slot></div>
    </div>
    <div id="r_kelas" class="form-group row">
        <label for="x_kelas" class="col-sm-3 col-form-label"><?= $Page->kelas->caption() ?></label>
        <div class="col-sm-8"><slot class="ew-slot" name="tpx_nilai_formatif_kelas"></slot></div>
    </div>
 </div>
</div>
</template>
<div id="xsr_<?= $Page->SearchRowCount + 1 ?>" class="ew-row d-sm-flex">
    <div class="ew-quick-search input-group">
        <input type="text" name="<?= Config("TABLE_BASIC_SEARCH") ?>" id="<?= Config("TABLE_BASIC_SEARCH") ?>" class="form-control" value="<?= HtmlEncode($Page->BasicSearch->getKeyword()) ?>">
        <input type="hidden" name="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" id="<?= Config("TABLE_BASIC_SEARCH_TYPE") ?>" value="<?= HtmlEncode($Page->BasicSearch->getType()) ?>">
        <div class="input-group-append">
            <button class="btn btn-primary" name="btn-submit" id="btn-submit" type="submit"><?= $Language->phrase("SearchBtn") ?></button>
            <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle dropdown-toggle-split" aria-haspopup="true" aria-expanded="false"><span id="searchtype"><?= $Page->BasicSearch->getTypeNameShort() ?></span></button>
            <div class="dropdown-menu dropdown-menu-right">
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this);"><?= $Language->phrase("QuickSearchAuto") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "=") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, '=');"><?= $Language->phrase("QuickSearchExact") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "AND") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'AND');"><?= $Language->phrase("QuickSearchAll") ?></a>
                <a class="dropdown-item<?php if ($Page->BasicSearch->getType() == "OR") { ?> active<?php } ?>" href="#" onclick="return ew.setSearchType(this, 'OR');"><?= $Language->phrase("QuickSearchAny") ?></a>
            </div>
        </div>
    </div>
</div>
    </div><!-- /.ew-extended-search -->
</div><!-- /.ew-search-panel -->
</form>
<script>
loadjs.ready(["jsrender", "makerjs"], function() {
    ew.applyTemplate("tpsd_nilai_formatiflist", "tpsm_nilai_formatiflist");
});
</script>
<?php } ?>
<?php } ?>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<?php if ($Page->TotalRecords > 0 || $Page->CurrentAction) { ?>
<div class="card ew-card ew-grid<?php if ($Page->isAddOrEdit()) { ?> ew-grid-add-edit<?php } ?> nilai_formatif">
<?php if (!$Page->isExport()) { ?>
<div class="card-header ew-grid-upper-panel">
<?php if (!$Page->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?= CurrentPageUrl(false) ?>">
<?= $Page->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<form name="fnilai_formatiflist" id="fnilai_formatiflist" class="form-inline ew-form ew-list-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="nilai_formatif">
<?php if ($Page->getCurrentMasterTable() == "penilaian" && $Page->CurrentAction) { ?>
<input type="hidden" name="<?= Config("TABLE_SHOW_MASTER") ?>" value="penilaian">
<input type="hidden" name="fk_penilaian_id" value="<?= HtmlEncode($Page->penilaian_id->getSessionValue()) ?>">
<?php } ?>
<div id="gmp_nilai_formatif" class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<?php if ($Page->TotalRecords > 0 || $Page->isGridEdit()) { ?>
<table id="tbl_nilai_formatiflist" class="table ew-table"><!-- .ew-table -->
<thead>
    <tr class="ew-table-header">
<?php
// Header row
$Page->RowType = ROWTYPE_HEADER;

// Render list options
$Page->renderListOptions();

// Render list options (header, left)
$Page->ListOptions->render("header", "left");
?>
<?php if ($Page->nilai_f_id->Visible) { // nilai_f_id ?>
        <th data-name="nilai_f_id" class="<?= $Page->nilai_f_id->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_nilai_f_id" class="nilai_formatif_nilai_f_id"><?= $Page->renderSort($Page->nilai_f_id) ?></div></th>
<?php } ?>
<?php if ($Page->guru_id->Visible) { // guru_id ?>
        <th data-name="guru_id" class="<?= $Page->guru_id->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_guru_id" class="nilai_formatif_guru_id"><?= $Page->renderSort($Page->guru_id) ?></div></th>
<?php } ?>
<?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
        <th data-name="kode_mapel" class="<?= $Page->kode_mapel->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_kode_mapel" class="nilai_formatif_kode_mapel"><?= $Page->renderSort($Page->kode_mapel) ?></div></th>
<?php } ?>
<?php if ($Page->kelas->Visible) { // kelas ?>
        <th data-name="kelas" class="<?= $Page->kelas->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_kelas" class="nilai_formatif_kelas"><?= $Page->renderSort($Page->kelas) ?></div></th>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
        <th data-name="nama" class="<?= $Page->nama->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_nama" class="nilai_formatif_nama"><?= $Page->renderSort($Page->nama) ?></div></th>
<?php } ?>
<?php if ($Page->jk->Visible) { // jk ?>
        <th data-name="jk" class="<?= $Page->jk->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_jk" class="nilai_formatif_jk"><?= $Page->renderSort($Page->jk) ?></div></th>
<?php } ?>
<?php if ($Page->f1->Visible) { // f1 ?>
        <th data-name="f1" class="<?= $Page->f1->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f1" class="nilai_formatif_f1"><?= $Page->renderSort($Page->f1) ?></div></th>
<?php } ?>
<?php if ($Page->f2->Visible) { // f2 ?>
        <th data-name="f2" class="<?= $Page->f2->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f2" class="nilai_formatif_f2"><?= $Page->renderSort($Page->f2) ?></div></th>
<?php } ?>
<?php if ($Page->f3->Visible) { // f3 ?>
        <th data-name="f3" class="<?= $Page->f3->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f3" class="nilai_formatif_f3"><?= $Page->renderSort($Page->f3) ?></div></th>
<?php } ?>
<?php if ($Page->f4->Visible) { // f4 ?>
        <th data-name="f4" class="<?= $Page->f4->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f4" class="nilai_formatif_f4"><?= $Page->renderSort($Page->f4) ?></div></th>
<?php } ?>
<?php if ($Page->f5->Visible) { // f5 ?>
        <th data-name="f5" class="<?= $Page->f5->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f5" class="nilai_formatif_f5"><?= $Page->renderSort($Page->f5) ?></div></th>
<?php } ?>
<?php if ($Page->f6->Visible) { // f6 ?>
        <th data-name="f6" class="<?= $Page->f6->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f6" class="nilai_formatif_f6"><?= $Page->renderSort($Page->f6) ?></div></th>
<?php } ?>
<?php if ($Page->f7->Visible) { // f7 ?>
        <th data-name="f7" class="<?= $Page->f7->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f7" class="nilai_formatif_f7"><?= $Page->renderSort($Page->f7) ?></div></th>
<?php } ?>
<?php if ($Page->f8->Visible) { // f8 ?>
        <th data-name="f8" class="<?= $Page->f8->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f8" class="nilai_formatif_f8"><?= $Page->renderSort($Page->f8) ?></div></th>
<?php } ?>
<?php if ($Page->f9->Visible) { // f9 ?>
        <th data-name="f9" class="<?= $Page->f9->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f9" class="nilai_formatif_f9"><?= $Page->renderSort($Page->f9) ?></div></th>
<?php } ?>
<?php if ($Page->f10->Visible) { // f10 ?>
        <th data-name="f10" class="<?= $Page->f10->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f10" class="nilai_formatif_f10"><?= $Page->renderSort($Page->f10) ?></div></th>
<?php } ?>
<?php if ($Page->f11->Visible) { // f11 ?>
        <th data-name="f11" class="<?= $Page->f11->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f11" class="nilai_formatif_f11"><?= $Page->renderSort($Page->f11) ?></div></th>
<?php } ?>
<?php if ($Page->f12->Visible) { // f12 ?>
        <th data-name="f12" class="<?= $Page->f12->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f12" class="nilai_formatif_f12"><?= $Page->renderSort($Page->f12) ?></div></th>
<?php } ?>
<?php if ($Page->f13->Visible) { // f13 ?>
        <th data-name="f13" class="<?= $Page->f13->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f13" class="nilai_formatif_f13"><?= $Page->renderSort($Page->f13) ?></div></th>
<?php } ?>
<?php if ($Page->f14->Visible) { // f14 ?>
        <th data-name="f14" class="<?= $Page->f14->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f14" class="nilai_formatif_f14"><?= $Page->renderSort($Page->f14) ?></div></th>
<?php } ?>
<?php if ($Page->f15->Visible) { // f15 ?>
        <th data-name="f15" class="<?= $Page->f15->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_f15" class="nilai_formatif_f15"><?= $Page->renderSort($Page->f15) ?></div></th>
<?php } ?>
<?php if ($Page->naf->Visible) { // naf ?>
        <th data-name="naf" class="<?= $Page->naf->headerCellClass() ?>" style="white-space: nowrap;"><div id="elh_nilai_formatif_naf" class="nilai_formatif_naf"><?= $Page->renderSort($Page->naf) ?></div></th>
<?php } ?>
<?php
// Render list options (header, right)
$Page->ListOptions->render("header", "right");
?>
    </tr>
</thead>
<tbody>
<?php
if ($Page->ExportAll && $Page->isExport()) {
    $Page->StopRecord = $Page->TotalRecords;
} else {
    // Set the last record to display
    if ($Page->TotalRecords > $Page->StartRecord + $Page->DisplayRecords - 1) {
        $Page->StopRecord = $Page->StartRecord + $Page->DisplayRecords - 1;
    } else {
        $Page->StopRecord = $Page->TotalRecords;
    }
}
$Page->RecordCount = $Page->StartRecord - 1;
if ($Page->Recordset && !$Page->Recordset->EOF) {
    // Nothing to do
} elseif (!$Page->AllowAddDeleteRow && $Page->StopRecord == 0) {
    $Page->StopRecord = $Page->GridAddRowCount;
}

// Initialize aggregate
$Page->RowType = ROWTYPE_AGGREGATEINIT;
$Page->resetAttributes();
$Page->renderRow();
while ($Page->RecordCount < $Page->StopRecord) {
    $Page->RecordCount++;
    if ($Page->RecordCount >= $Page->StartRecord) {
        $Page->RowCount++;

        // Set up key count
        $Page->KeyCount = $Page->RowIndex;

        // Init row class and style
        $Page->resetAttributes();
        $Page->CssClass = "";
        if ($Page->isGridAdd()) {
            $Page->loadRowValues(); // Load default values
            $Page->OldKey = "";
            $Page->setKey($Page->OldKey);
        } else {
            $Page->loadRowValues($Page->Recordset); // Load row values
            if ($Page->isGridEdit()) {
                $Page->OldKey = $Page->getKey(true); // Get from CurrentValue
                $Page->setKey($Page->OldKey);
            }
        }
        $Page->RowType = ROWTYPE_VIEW; // Render view

        // Set up row id / data-rowindex
        $Page->RowAttrs->merge(["data-rowindex" => $Page->RowCount, "id" => "r" . $Page->RowCount . "_nilai_formatif", "data-rowtype" => $Page->RowType]);

        // Render row
        $Page->renderRow();

        // Render list options
        $Page->renderListOptions();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Page->ListOptions->render("body", "left", $Page->RowCount);
?>
    <?php if ($Page->nilai_f_id->Visible) { // nilai_f_id ?>
        <td data-name="nilai_f_id" <?= $Page->nilai_f_id->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_nilai_f_id">
<span<?= $Page->nilai_f_id->viewAttributes() ?>>
<?= $Page->nilai_f_id->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->guru_id->Visible) { // guru_id ?>
        <td data-name="guru_id" <?= $Page->guru_id->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_guru_id">
<span<?= $Page->guru_id->viewAttributes() ?>>
<?= $Page->guru_id->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
        <td data-name="kode_mapel" <?= $Page->kode_mapel->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_kode_mapel">
<span<?= $Page->kode_mapel->viewAttributes() ?>>
<?= $Page->kode_mapel->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->kelas->Visible) { // kelas ?>
        <td data-name="kelas" <?= $Page->kelas->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_kelas">
<span<?= $Page->kelas->viewAttributes() ?>>
<?= $Page->kelas->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->nama->Visible) { // nama ?>
        <td data-name="nama" <?= $Page->nama->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_nama">
<span<?= $Page->nama->viewAttributes() ?>>
<?= $Page->nama->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->jk->Visible) { // jk ?>
        <td data-name="jk" <?= $Page->jk->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_jk">
<span<?= $Page->jk->viewAttributes() ?>>
<?= $Page->jk->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f1->Visible) { // f1 ?>
        <td data-name="f1" <?= $Page->f1->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f1">
<span<?= $Page->f1->viewAttributes() ?>>
<?= $Page->f1->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f2->Visible) { // f2 ?>
        <td data-name="f2" <?= $Page->f2->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f2">
<span<?= $Page->f2->viewAttributes() ?>>
<?= $Page->f2->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f3->Visible) { // f3 ?>
        <td data-name="f3" <?= $Page->f3->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f3">
<span<?= $Page->f3->viewAttributes() ?>>
<?= $Page->f3->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f4->Visible) { // f4 ?>
        <td data-name="f4" <?= $Page->f4->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f4">
<span<?= $Page->f4->viewAttributes() ?>>
<?= $Page->f4->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f5->Visible) { // f5 ?>
        <td data-name="f5" <?= $Page->f5->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f5">
<span<?= $Page->f5->viewAttributes() ?>>
<?= $Page->f5->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f6->Visible) { // f6 ?>
        <td data-name="f6" <?= $Page->f6->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f6">
<span<?= $Page->f6->viewAttributes() ?>>
<?= $Page->f6->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f7->Visible) { // f7 ?>
        <td data-name="f7" <?= $Page->f7->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f7">
<span<?= $Page->f7->viewAttributes() ?>>
<?= $Page->f7->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f8->Visible) { // f8 ?>
        <td data-name="f8" <?= $Page->f8->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f8">
<span<?= $Page->f8->viewAttributes() ?>>
<?= $Page->f8->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f9->Visible) { // f9 ?>
        <td data-name="f9" <?= $Page->f9->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f9">
<span<?= $Page->f9->viewAttributes() ?>>
<?= $Page->f9->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f10->Visible) { // f10 ?>
        <td data-name="f10" <?= $Page->f10->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f10">
<span<?= $Page->f10->viewAttributes() ?>>
<?= $Page->f10->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f11->Visible) { // f11 ?>
        <td data-name="f11" <?= $Page->f11->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f11">
<span<?= $Page->f11->viewAttributes() ?>>
<?= $Page->f11->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f12->Visible) { // f12 ?>
        <td data-name="f12" <?= $Page->f12->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f12">
<span<?= $Page->f12->viewAttributes() ?>>
<?= $Page->f12->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f13->Visible) { // f13 ?>
        <td data-name="f13" <?= $Page->f13->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f13">
<span<?= $Page->f13->viewAttributes() ?>>
<?= $Page->f13->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f14->Visible) { // f14 ?>
        <td data-name="f14" <?= $Page->f14->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f14">
<span<?= $Page->f14->viewAttributes() ?>>
<?= $Page->f14->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->f15->Visible) { // f15 ?>
        <td data-name="f15" <?= $Page->f15->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_f15">
<span<?= $Page->f15->viewAttributes() ?>>
<?= $Page->f15->getViewValue() ?></span>
</span>
</td>
    <?php } ?>
    <?php if ($Page->naf->Visible) { // naf ?>
        <td data-name="naf" <?= $Page->naf->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_nilai_formatif_naf">
<span<?= $Page->naf->viewAttributes() ?>><?php
$nilai_f_id = $Page->nilai_f_id->getViewValue();
echo $naf = number_format($Page->naf->getViewValue(), 0);
echo '<style>[data-name="naf"] {color : black;background-color: white;}</style>';
?>
</span>
</span>
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Page->ListOptions->render("body", "right", $Page->RowCount);
?>
    </tr>
<?php
    }
    if (!$Page->isGridAdd()) {
        $Page->Recordset->moveNext();
    }
}
?>
</tbody>
</table><!-- /.ew-table -->
<?php } ?>
</div><!-- /.ew-grid-middle-panel -->
<?php if (!$Page->CurrentAction) { ?>
<input type="hidden" name="action" id="action" value="">
<?php } ?>
</form><!-- /.ew-list-form -->
<?php
// Close recordset
if ($Page->Recordset) {
    $Page->Recordset->close();
}
?>
<?php if (!$Page->isExport()) { ?>
<div class="card-footer ew-grid-lower-panel">
<?php if (!$Page->isGridAdd()) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?= CurrentPageUrl(false) ?>">
<?= $Page->Pager->render() ?>
</form>
<?php } ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body", "bottom") ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
</div><!-- /.ew-grid -->
<?php } ?>
<?php if ($Page->TotalRecords == 0 && !$Page->CurrentAction) { // Show other options ?>
<div class="ew-list-other-options">
<?php $Page->OtherOptions->render("body") ?>
</div>
<div class="clearfix"></div>
<?php } ?>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<?php if (!$Page->isExport()) { ?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("nilai_formatif");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php } ?>
