<?php

namespace PHPMaker2021\rdigital21;

// Page object
$GuruList = &$Page;
?>
<?php if (!$Page->isExport()) { ?>
<script>
var currentForm, currentPageID;
var fgurulist;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "list";
    fgurulist = currentForm = new ew.Form("fgurulist", "list");
    fgurulist.formKeyCountName = '<?= $Page->FormKeyCountName ?>';

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "guru")) ?>,
        fields = currentTable.fields;
    if (!ew.vars.tables.guru)
        ew.vars.tables.guru = currentTable;
    fgurulist.addFields([
        ["guru_id", [fields.guru_id.visible && fields.guru_id.required ? ew.Validators.required(fields.guru_id.caption) : null], fields.guru_id.isInvalid],
        ["kode_tapel", [fields.kode_tapel.visible && fields.kode_tapel.required ? ew.Validators.required(fields.kode_tapel.caption) : null], fields.kode_tapel.isInvalid],
        ["nama", [fields.nama.visible && fields.nama.required ? ew.Validators.required(fields.nama.caption) : null], fields.nama.isInvalid],
        ["nip", [fields.nip.visible && fields.nip.required ? ew.Validators.required(fields.nip.caption) : null], fields.nip.isInvalid],
        ["user", [fields.user.visible && fields.user.required ? ew.Validators.required(fields.user.caption) : null], fields.user.isInvalid],
        ["pass", [fields.pass.visible && fields.pass.required ? ew.Validators.required(fields.pass.caption) : null], fields.pass.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        var f = fgurulist,
            fobj = f.getForm(),
            $fobj = $(fobj),
            $k = $fobj.find("#" + f.formKeyCountName), // Get key_count
            rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1,
            startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
        for (var i = startcnt; i <= rowcnt; i++) {
            var rowIndex = ($k[0]) ? String(i) : "";
            f.setInvalid(rowIndex);
        }
    });

    // Validate form
    fgurulist.validate = function () {
        if (!this.validateRequired)
            return true; // Ignore validation
        var fobj = this.getForm(),
            $fobj = $(fobj);
        if ($fobj.find("#confirm").val() == "confirm")
            return true;
        var addcnt = 0,
            $k = $fobj.find("#" + this.formKeyCountName), // Get key_count
            rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1,
            startcnt = (rowcnt == 0) ? 0 : 1, // Check rowcnt == 0 => Inline-Add
            gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
        for (var i = startcnt; i <= rowcnt; i++) {
            var rowIndex = ($k[0]) ? String(i) : "";
            $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
    fgurulist.customValidate = function(fobj) { // DO NOT CHANGE THIS LINE!
        // Your custom validation code here, return false if invalid.
        return true;
    }

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

    // Dynamic selection lists
    loadjs.done("fgurulist");
});
var fgurulistsrch, currentSearchForm, currentAdvancedSearchForm;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object for search
    fgurulistsrch = currentSearchForm = new ew.Form("fgurulistsrch");

    // Dynamic selection lists

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

    // Init search panel as collapsed
    fgurulistsrch.initSearchPanel = true;
    loadjs.done("fgurulistsrch");
});
</script>
<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 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
$Page->renderOtherOptions();
?>
<?php if ($Security->canSearch()) { ?>
<?php if (!$Page->isExport() && !$Page->CurrentAction) { ?>
<form name="fgurulistsrch" id="fgurulistsrch" class="form-inline ew-form ew-ext-search-form" action="<?= CurrentPageUrl(false) ?>">
<div id="fgurulistsrch-search-panel" class="<?= $Page->SearchPanelClass ?>">
<input type="hidden" name="cmd" value="search">
<input type="hidden" name="t" value="guru">
    <div class="ew-extended-search">
<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>
<?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 } ?> guru">
<?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="fgurulist" id="fgurulist" 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="guru">
<div id="gmp_guru" class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<?php if ($Page->TotalRecords > 0 || $Page->isGridEdit()) { ?>
<table id="tbl_gurulist" 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->guru_id->Visible) { // guru_id ?>
        <th data-name="guru_id" class="<?= $Page->guru_id->headerCellClass() ?>"><div id="elh_guru_guru_id" class="guru_guru_id"><?= $Page->renderSort($Page->guru_id) ?></div></th>
<?php } ?>
<?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <th data-name="kode_tapel" class="<?= $Page->kode_tapel->headerCellClass() ?>"><div id="elh_guru_kode_tapel" class="guru_kode_tapel"><?= $Page->renderSort($Page->kode_tapel) ?></div></th>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
        <th data-name="nama" class="<?= $Page->nama->headerCellClass() ?>"><div id="elh_guru_nama" class="guru_nama"><?= $Page->renderSort($Page->nama) ?></div></th>
<?php } ?>
<?php if ($Page->nip->Visible) { // nip ?>
        <th data-name="nip" class="<?= $Page->nip->headerCellClass() ?>"><div id="elh_guru_nip" class="guru_nip"><?= $Page->renderSort($Page->nip) ?></div></th>
<?php } ?>
<?php if ($Page->user->Visible) { // user ?>
        <th data-name="user" class="<?= $Page->user->headerCellClass() ?>"><div id="elh_guru_user" class="guru_user"><?= $Page->renderSort($Page->user) ?></div></th>
<?php } ?>
<?php if ($Page->pass->Visible) { // pass ?>
        <th data-name="pass" class="<?= $Page->pass->headerCellClass() ?>"><div id="elh_guru_pass" class="guru_pass"><?= $Page->renderSort($Page->pass) ?></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;
    }
}

// Restore number of post back records
if ($CurrentForm && ($Page->isConfirm() || $Page->EventCancelled)) {
    $CurrentForm->Index = -1;
    if ($CurrentForm->hasValue($Page->FormKeyCountName) && ($Page->isGridAdd() || $Page->isGridEdit() || $Page->isConfirm())) {
        $Page->KeyCount = $CurrentForm->getValue($Page->FormKeyCountName);
        $Page->StopRecord = $Page->StartRecord + $Page->KeyCount - 1;
    }
}
$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();
if ($Page->isGridEdit())
    $Page->RowIndex = 0;
while ($Page->RecordCount < $Page->StopRecord) {
    $Page->RecordCount++;
    if ($Page->RecordCount >= $Page->StartRecord) {
        $Page->RowCount++;
        if ($Page->isGridAdd() || $Page->isGridEdit() || $Page->isConfirm()) {
            $Page->RowIndex++;
            $CurrentForm->Index = $Page->RowIndex;
            if ($CurrentForm->hasValue($Page->FormActionName) && ($Page->isConfirm() || $Page->EventCancelled)) {
                $Page->RowAction = strval($CurrentForm->getValue($Page->FormActionName));
            } elseif ($Page->isGridAdd()) {
                $Page->RowAction = "insert";
            } else {
                $Page->RowAction = "";
            }
        }

        // 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
        if ($Page->isGridEdit()) { // Grid edit
            if ($Page->EventCancelled) {
                $Page->restoreCurrentRowFormValues($Page->RowIndex); // Restore form values
            }
            if ($Page->RowAction == "insert") {
                $Page->RowType = ROWTYPE_ADD; // Render add
            } else {
                $Page->RowType = ROWTYPE_EDIT; // Render edit
            }
        }
        if ($Page->isGridEdit() && ($Page->RowType == ROWTYPE_EDIT || $Page->RowType == ROWTYPE_ADD) && $Page->EventCancelled) { // Update failed
            $Page->restoreCurrentRowFormValues($Page->RowIndex); // Restore form values
        }
        if ($Page->RowType == ROWTYPE_EDIT) { // Edit row
            $Page->EditRowCount++;
        }

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

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

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

        // Skip delete row / empty row for confirm page
        if ($Page->RowAction != "delete" && $Page->RowAction != "insertdelete" && !($Page->RowAction == "insert" && $Page->isConfirm() && $Page->emptyRow())) {
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Page->ListOptions->render("body", "left", $Page->RowCount);
?>
    <?php if ($Page->guru_id->Visible) { // guru_id ?>
        <td data-name="guru_id" <?= $Page->guru_id->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Page->RowCount ?>_guru_guru_id" class="form-group"></span>
<input type="hidden" data-table="guru" data-field="x_guru_id" data-hidden="1" name="o<?= $Page->RowIndex ?>_guru_id" id="o<?= $Page->RowIndex ?>_guru_id" value="<?= HtmlEncode($Page->guru_id->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Page->RowCount ?>_guru_guru_id" class="form-group">
<span<?= $Page->guru_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->guru_id->getDisplayValue($Page->guru_id->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="guru" data-field="x_guru_id" data-hidden="1" name="x<?= $Page->RowIndex ?>_guru_id" id="x<?= $Page->RowIndex ?>_guru_id" value="<?= HtmlEncode($Page->guru_id->CurrentValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_guru_id">
<span<?= $Page->guru_id->viewAttributes() ?>>
<?= $Page->guru_id->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } else { ?>
            <input type="hidden" data-table="guru" data-field="x_guru_id" data-hidden="1" name="x<?= $Page->RowIndex ?>_guru_id" id="x<?= $Page->RowIndex ?>_guru_id" value="<?= HtmlEncode($Page->guru_id->CurrentValue) ?>">
    <?php } ?>
    <?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <td data-name="kode_tapel" <?= $Page->kode_tapel->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<input type="hidden" data-table="guru" data-field="x_kode_tapel" data-hidden="1" name="o<?= $Page->RowIndex ?>_kode_tapel" id="o<?= $Page->RowIndex ?>_kode_tapel" value="<?= HtmlEncode($Page->kode_tapel->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_kode_tapel">
<span<?= $Page->kode_tapel->viewAttributes() ?>>
<?= $Page->kode_tapel->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Page->nama->Visible) { // nama ?>
        <td data-name="nama" <?= $Page->nama->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Page->RowCount ?>_guru_nama" class="form-group">
<input type="<?= $Page->nama->getInputTextType() ?>" data-table="guru" data-field="x_nama" name="x<?= $Page->RowIndex ?>_nama" id="x<?= $Page->RowIndex ?>_nama" size="30" maxlength="255" value="<?= $Page->nama->EditValue ?>"<?= $Page->nama->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nama->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_nama" data-hidden="1" name="o<?= $Page->RowIndex ?>_nama" id="o<?= $Page->RowIndex ?>_nama" value="<?= HtmlEncode($Page->nama->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Page->RowCount ?>_guru_nama" class="form-group">
<input type="<?= $Page->nama->getInputTextType() ?>" data-table="guru" data-field="x_nama" name="x<?= $Page->RowIndex ?>_nama" id="x<?= $Page->RowIndex ?>_nama" size="30" maxlength="255" value="<?= $Page->nama->EditValue ?>"<?= $Page->nama->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nama->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_nama">
<span<?= $Page->nama->viewAttributes() ?>>
<?= $Page->nama->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Page->nip->Visible) { // nip ?>
        <td data-name="nip" <?= $Page->nip->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Page->RowCount ?>_guru_nip" class="form-group">
<input type="<?= $Page->nip->getInputTextType() ?>" data-table="guru" data-field="x_nip" name="x<?= $Page->RowIndex ?>_nip" id="x<?= $Page->RowIndex ?>_nip" size="30" maxlength="255" value="<?= $Page->nip->EditValue ?>"<?= $Page->nip->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nip->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_nip" data-hidden="1" name="o<?= $Page->RowIndex ?>_nip" id="o<?= $Page->RowIndex ?>_nip" value="<?= HtmlEncode($Page->nip->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Page->RowCount ?>_guru_nip" class="form-group">
<input type="<?= $Page->nip->getInputTextType() ?>" data-table="guru" data-field="x_nip" name="x<?= $Page->RowIndex ?>_nip" id="x<?= $Page->RowIndex ?>_nip" size="30" maxlength="255" value="<?= $Page->nip->EditValue ?>"<?= $Page->nip->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nip->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_nip">
<span<?= $Page->nip->viewAttributes() ?>>
<?= $Page->nip->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Page->user->Visible) { // user ?>
        <td data-name="user" <?= $Page->user->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Page->RowCount ?>_guru_user" class="form-group">
<input type="<?= $Page->user->getInputTextType() ?>" data-table="guru" data-field="x_user" name="x<?= $Page->RowIndex ?>_user" id="x<?= $Page->RowIndex ?>_user" size="30" maxlength="255" value="<?= $Page->user->EditValue ?>"<?= $Page->user->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->user->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_user" data-hidden="1" name="o<?= $Page->RowIndex ?>_user" id="o<?= $Page->RowIndex ?>_user" value="<?= HtmlEncode($Page->user->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Page->RowCount ?>_guru_user" class="form-group">
<input type="<?= $Page->user->getInputTextType() ?>" data-table="guru" data-field="x_user" name="x<?= $Page->RowIndex ?>_user" id="x<?= $Page->RowIndex ?>_user" size="30" maxlength="255" value="<?= $Page->user->EditValue ?>"<?= $Page->user->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->user->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_user">
<span<?= $Page->user->viewAttributes() ?>>
<?= $Page->user->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } ?>
    <?php if ($Page->pass->Visible) { // pass ?>
        <td data-name="pass" <?= $Page->pass->cellAttributes() ?>>
<?php if ($Page->RowType == ROWTYPE_ADD) { // Add record ?>
<span id="el<?= $Page->RowCount ?>_guru_pass" class="form-group">
<input type="<?= $Page->pass->getInputTextType() ?>" data-table="guru" data-field="x_pass" name="x<?= $Page->RowIndex ?>_pass" id="x<?= $Page->RowIndex ?>_pass" size="30" maxlength="255" value="<?= $Page->pass->EditValue ?>"<?= $Page->pass->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->pass->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_pass" data-hidden="1" name="o<?= $Page->RowIndex ?>_pass" id="o<?= $Page->RowIndex ?>_pass" value="<?= HtmlEncode($Page->pass->OldValue) ?>">
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?= $Page->RowCount ?>_guru_pass" class="form-group">
<input type="<?= $Page->pass->getInputTextType() ?>" data-table="guru" data-field="x_pass" name="x<?= $Page->RowIndex ?>_pass" id="x<?= $Page->RowIndex ?>_pass" size="30" maxlength="255" value="<?= $Page->pass->EditValue ?>"<?= $Page->pass->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->pass->getErrorMessage() ?></div>
</span>
<?php } ?>
<?php if ($Page->RowType == ROWTYPE_VIEW) { // View record ?>
<span id="el<?= $Page->RowCount ?>_guru_pass">
<span<?= $Page->pass->viewAttributes() ?>>
<?= $Page->pass->getViewValue() ?></span>
</span>
<?php } ?>
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Page->ListOptions->render("body", "right", $Page->RowCount);
?>
    </tr>
<?php if ($Page->RowType == ROWTYPE_ADD || $Page->RowType == ROWTYPE_EDIT) { ?>
<script>
loadjs.ready(["fgurulist","load"], function () {
    fgurulist.updateLists(<?= $Page->RowIndex ?>);
});
</script>
<?php } ?>
<?php
    }
    } // End delete row checking
    if (!$Page->isGridAdd())
        if (!$Page->Recordset->EOF) {
            $Page->Recordset->moveNext();
        }
}
?>
<?php
    if ($Page->isGridAdd() || $Page->isGridEdit()) {
        $Page->RowIndex = '$rowindex$';
        $Page->loadRowValues();

        // Set row properties
        $Page->resetAttributes();
        $Page->RowAttrs->merge(["data-rowindex" => $Page->RowIndex, "id" => "r0_guru", "data-rowtype" => ROWTYPE_ADD]);
        $Page->RowAttrs->appendClass("ew-template");
        $Page->RowType = ROWTYPE_ADD;

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

        // Render list options
        $Page->renderListOptions();
        $Page->StartRowCount = 0;
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php
// Render list options (body, left)
$Page->ListOptions->render("body", "left", $Page->RowIndex);
?>
    <?php if ($Page->guru_id->Visible) { // guru_id ?>
        <td data-name="guru_id">
<span id="el$rowindex$_guru_guru_id" class="form-group guru_guru_id"></span>
<input type="hidden" data-table="guru" data-field="x_guru_id" data-hidden="1" name="o<?= $Page->RowIndex ?>_guru_id" id="o<?= $Page->RowIndex ?>_guru_id" value="<?= HtmlEncode($Page->guru_id->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <td data-name="kode_tapel">
<input type="hidden" data-table="guru" data-field="x_kode_tapel" data-hidden="1" name="o<?= $Page->RowIndex ?>_kode_tapel" id="o<?= $Page->RowIndex ?>_kode_tapel" value="<?= HtmlEncode($Page->kode_tapel->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Page->nama->Visible) { // nama ?>
        <td data-name="nama">
<span id="el$rowindex$_guru_nama" class="form-group guru_nama">
<input type="<?= $Page->nama->getInputTextType() ?>" data-table="guru" data-field="x_nama" name="x<?= $Page->RowIndex ?>_nama" id="x<?= $Page->RowIndex ?>_nama" size="30" maxlength="255" value="<?= $Page->nama->EditValue ?>"<?= $Page->nama->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nama->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_nama" data-hidden="1" name="o<?= $Page->RowIndex ?>_nama" id="o<?= $Page->RowIndex ?>_nama" value="<?= HtmlEncode($Page->nama->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Page->nip->Visible) { // nip ?>
        <td data-name="nip">
<span id="el$rowindex$_guru_nip" class="form-group guru_nip">
<input type="<?= $Page->nip->getInputTextType() ?>" data-table="guru" data-field="x_nip" name="x<?= $Page->RowIndex ?>_nip" id="x<?= $Page->RowIndex ?>_nip" size="30" maxlength="255" value="<?= $Page->nip->EditValue ?>"<?= $Page->nip->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->nip->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_nip" data-hidden="1" name="o<?= $Page->RowIndex ?>_nip" id="o<?= $Page->RowIndex ?>_nip" value="<?= HtmlEncode($Page->nip->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Page->user->Visible) { // user ?>
        <td data-name="user">
<span id="el$rowindex$_guru_user" class="form-group guru_user">
<input type="<?= $Page->user->getInputTextType() ?>" data-table="guru" data-field="x_user" name="x<?= $Page->RowIndex ?>_user" id="x<?= $Page->RowIndex ?>_user" size="30" maxlength="255" value="<?= $Page->user->EditValue ?>"<?= $Page->user->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->user->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_user" data-hidden="1" name="o<?= $Page->RowIndex ?>_user" id="o<?= $Page->RowIndex ?>_user" value="<?= HtmlEncode($Page->user->OldValue) ?>">
</td>
    <?php } ?>
    <?php if ($Page->pass->Visible) { // pass ?>
        <td data-name="pass">
<span id="el$rowindex$_guru_pass" class="form-group guru_pass">
<input type="<?= $Page->pass->getInputTextType() ?>" data-table="guru" data-field="x_pass" name="x<?= $Page->RowIndex ?>_pass" id="x<?= $Page->RowIndex ?>_pass" size="30" maxlength="255" value="<?= $Page->pass->EditValue ?>"<?= $Page->pass->editAttributes() ?>>
<div class="invalid-feedback"><?= $Page->pass->getErrorMessage() ?></div>
</span>
<input type="hidden" data-table="guru" data-field="x_pass" data-hidden="1" name="o<?= $Page->RowIndex ?>_pass" id="o<?= $Page->RowIndex ?>_pass" value="<?= HtmlEncode($Page->pass->OldValue) ?>">
</td>
    <?php } ?>
<?php
// Render list options (body, right)
$Page->ListOptions->render("body", "right", $Page->RowIndex);
?>
<script>
loadjs.ready(["fgurulist","load"], function() {
    fgurulist.updateLists(<?= $Page->RowIndex ?>);
});
</script>
    </tr>
<?php
    }
?>
</tbody>
</table><!-- /.ew-table -->
<?php } ?>
</div><!-- /.ew-grid-middle-panel -->
<?php if ($Page->isGridEdit()) { ?>
<input type="hidden" name="action" id="action" value="gridupdate">
<input type="hidden" name="<?= $Page->FormKeyCountName ?>" id="<?= $Page->FormKeyCountName ?>" value="<?= $Page->KeyCount ?>">
<?= $Page->MultiSelectKey ?>
<?php } ?>
<?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("guru");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php } ?>
