<?php

namespace PHPMaker2021\rdigital21;

// Page object
$ExtraAbsensiEdit = &$Page;
?>
<script>
var currentForm, currentPageID;
var fextra_absensiedit;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "edit";
    fextra_absensiedit = currentForm = new ew.Form("fextra_absensiedit", "edit");

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "extra_absensi")) ?>,
        fields = currentTable.fields;
    if (!ew.vars.tables.extra_absensi)
        ew.vars.tables.extra_absensi = currentTable;
    fextra_absensiedit.addFields([
        ["kode_tapel", [fields.kode_tapel.visible && fields.kode_tapel.required ? ew.Validators.required(fields.kode_tapel.caption) : null], fields.kode_tapel.isInvalid],
        ["kelas", [fields.kelas.visible && fields.kelas.required ? ew.Validators.required(fields.kelas.caption) : null], fields.kelas.isInvalid],
        ["nisn", [fields.nisn.visible && fields.nisn.required ? ew.Validators.required(fields.nisn.caption) : null], fields.nisn.isInvalid],
        ["nis", [fields.nis.visible && fields.nis.required ? ew.Validators.required(fields.nis.caption) : null], fields.nis.isInvalid],
        ["nama", [fields.nama.visible && fields.nama.required ? ew.Validators.required(fields.nama.caption) : null], fields.nama.isInvalid],
        ["jk", [fields.jk.visible && fields.jk.required ? ew.Validators.required(fields.jk.caption) : null], fields.jk.isInvalid],
        ["s", [fields.s.visible && fields.s.required ? ew.Validators.required(fields.s.caption) : null], fields.s.isInvalid],
        ["_i", [fields._i.visible && fields._i.required ? ew.Validators.required(fields._i.caption) : null], fields._i.isInvalid],
        ["a", [fields.a.visible && fields.a.required ? ew.Validators.required(fields.a.caption) : null], fields.a.isInvalid],
        ["ekstra1", [fields.ekstra1.visible && fields.ekstra1.required ? ew.Validators.required(fields.ekstra1.caption) : null], fields.ekstra1.isInvalid],
        ["deskripsi1", [fields.deskripsi1.visible && fields.deskripsi1.required ? ew.Validators.required(fields.deskripsi1.caption) : null], fields.deskripsi1.isInvalid],
        ["ekstra2", [fields.ekstra2.visible && fields.ekstra2.required ? ew.Validators.required(fields.ekstra2.caption) : null], fields.ekstra2.isInvalid],
        ["deskripsi2", [fields.deskripsi2.visible && fields.deskripsi2.required ? ew.Validators.required(fields.deskripsi2.caption) : null], fields.deskripsi2.isInvalid],
        ["ekstra3", [fields.ekstra3.visible && fields.ekstra3.required ? ew.Validators.required(fields.ekstra3.caption) : null], fields.ekstra3.isInvalid],
        ["deskripsi3", [fields.deskripsi3.visible && fields.deskripsi3.required ? ew.Validators.required(fields.deskripsi3.caption) : null], fields.deskripsi3.isInvalid],
        ["ekstra4", [fields.ekstra4.visible && fields.ekstra4.required ? ew.Validators.required(fields.ekstra4.caption) : null], fields.ekstra4.isInvalid],
        ["deskripsi4", [fields.deskripsi4.visible && fields.deskripsi4.required ? ew.Validators.required(fields.deskripsi4.caption) : null], fields.deskripsi4.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        var f = fextra_absensiedit,
            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
    fextra_absensiedit.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;
            }
        }

        // Process detail forms
        var dfs = $fobj.find("input[name='detailpage']").get();
        for (var i = 0; i < dfs.length; i++) {
            var df = dfs[i],
                val = df.value,
                frm = ew.forms.get(val);
            if (val && frm && !frm.validate())
                return false;
        }
        return true;
    }

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

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

    // Dynamic selection lists
    fextra_absensiedit.lists.ekstra1 = <?= $Page->ekstra1->toClientList($Page) ?>;
    fextra_absensiedit.lists.deskripsi1 = <?= $Page->deskripsi1->toClientList($Page) ?>;
    fextra_absensiedit.lists.ekstra2 = <?= $Page->ekstra2->toClientList($Page) ?>;
    fextra_absensiedit.lists.deskripsi2 = <?= $Page->deskripsi2->toClientList($Page) ?>;
    fextra_absensiedit.lists.ekstra3 = <?= $Page->ekstra3->toClientList($Page) ?>;
    fextra_absensiedit.lists.deskripsi3 = <?= $Page->deskripsi3->toClientList($Page) ?>;
    fextra_absensiedit.lists.ekstra4 = <?= $Page->ekstra4->toClientList($Page) ?>;
    fextra_absensiedit.lists.deskripsi4 = <?= $Page->deskripsi4->toClientList($Page) ?>;
    loadjs.done("fextra_absensiedit");
});
</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="fextra_absensiedit" id="fextra_absensiedit" class="<?= $Page->FormClassName ?>" 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="extra_absensi">
<input type="hidden" name="action" id="action" value="update">
<input type="hidden" name="modal" value="<?= (int)$Page->IsModal ?>">
<input type="hidden" name="<?= $Page->OldKeyName ?>" value="<?= $Page->OldKey ?>">
<div class="ew-edit-div d-none"><!-- page* -->
<?php if ($Page->kelas->Visible) { // kelas ?>
    <div id="r_kelas" class="form-group row">
        <label id="elh_extra_absensi_kelas" for="x_kelas" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_kelas"><?= $Page->kelas->caption() ?><?= $Page->kelas->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kelas->cellAttributes() ?>>
<template id="tpx_extra_absensi_kelas"><span id="el_extra_absensi_kelas">
<span<?= $Page->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kelas->getDisplayValue($Page->kelas->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="extra_absensi" data-field="x_kelas" data-hidden="1" name="x_kelas" id="x_kelas" value="<?= HtmlEncode($Page->kelas->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nisn->Visible) { // nisn ?>
    <div id="r_nisn" class="form-group row">
        <label id="elh_extra_absensi_nisn" for="x_nisn" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_nisn"><?= $Page->nisn->caption() ?><?= $Page->nisn->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nisn->cellAttributes() ?>>
<template id="tpx_extra_absensi_nisn"><span id="el_extra_absensi_nisn">
<span<?= $Page->nisn->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->nisn->getDisplayValue($Page->nisn->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="extra_absensi" data-field="x_nisn" data-hidden="1" name="x_nisn" id="x_nisn" value="<?= HtmlEncode($Page->nisn->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nis->Visible) { // nis ?>
    <div id="r_nis" class="form-group row">
        <label id="elh_extra_absensi_nis" for="x_nis" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_nis"><?= $Page->nis->caption() ?><?= $Page->nis->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nis->cellAttributes() ?>>
<template id="tpx_extra_absensi_nis"><span id="el_extra_absensi_nis">
<span<?= $Page->nis->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->nis->getDisplayValue($Page->nis->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="extra_absensi" data-field="x_nis" data-hidden="1" name="x_nis" id="x_nis" value="<?= HtmlEncode($Page->nis->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
    <div id="r_nama" class="form-group row">
        <label id="elh_extra_absensi_nama" for="x_nama" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_nama"><?= $Page->nama->caption() ?><?= $Page->nama->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama->cellAttributes() ?>>
<template id="tpx_extra_absensi_nama"><span id="el_extra_absensi_nama">
<span<?= $Page->nama->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->nama->getDisplayValue($Page->nama->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="extra_absensi" data-field="x_nama" data-hidden="1" name="x_nama" id="x_nama" value="<?= HtmlEncode($Page->nama->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->jk->Visible) { // jk ?>
    <div id="r_jk" class="form-group row">
        <label id="elh_extra_absensi_jk" for="x_jk" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_jk"><?= $Page->jk->caption() ?><?= $Page->jk->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->jk->cellAttributes() ?>>
<template id="tpx_extra_absensi_jk"><span id="el_extra_absensi_jk">
<span<?= $Page->jk->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->jk->getDisplayValue($Page->jk->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="extra_absensi" data-field="x_jk" data-hidden="1" name="x_jk" id="x_jk" value="<?= HtmlEncode($Page->jk->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s->Visible) { // s ?>
    <div id="r_s" class="form-group row">
        <label id="elh_extra_absensi_s" for="x_s" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_s"><?= $Page->s->caption() ?><?= $Page->s->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s->cellAttributes() ?>>
<template id="tpx_extra_absensi_s"><span id="el_extra_absensi_s">
<input type="<?= $Page->s->getInputTextType() ?>" data-table="extra_absensi" data-field="x_s" name="x_s" id="x_s" size="3" maxlength="255" value="<?= $Page->s->EditValue ?>"<?= $Page->s->editAttributes() ?> aria-describedby="x_s_help">
<?= $Page->s->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->_i->Visible) { // i ?>
    <div id="r__i" class="form-group row">
        <label id="elh_extra_absensi__i" for="x__i" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi__i"><?= $Page->_i->caption() ?><?= $Page->_i->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->_i->cellAttributes() ?>>
<template id="tpx_extra_absensi__i"><span id="el_extra_absensi__i">
<input type="<?= $Page->_i->getInputTextType() ?>" data-table="extra_absensi" data-field="x__i" name="x__i" id="x__i" size="3" maxlength="255" value="<?= $Page->_i->EditValue ?>"<?= $Page->_i->editAttributes() ?> aria-describedby="x__i_help">
<?= $Page->_i->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->_i->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->a->Visible) { // a ?>
    <div id="r_a" class="form-group row">
        <label id="elh_extra_absensi_a" for="x_a" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_a"><?= $Page->a->caption() ?><?= $Page->a->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->a->cellAttributes() ?>>
<template id="tpx_extra_absensi_a"><span id="el_extra_absensi_a">
<input type="<?= $Page->a->getInputTextType() ?>" data-table="extra_absensi" data-field="x_a" name="x_a" id="x_a" size="3" maxlength="255" value="<?= $Page->a->EditValue ?>"<?= $Page->a->editAttributes() ?> aria-describedby="x_a_help">
<?= $Page->a->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->a->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->ekstra1->Visible) { // ekstra1 ?>
    <div id="r_ekstra1" class="form-group row">
        <label id="elh_extra_absensi_ekstra1" for="x_ekstra1" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_ekstra1"><?= $Page->ekstra1->caption() ?><?= $Page->ekstra1->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->ekstra1->cellAttributes() ?>>
<template id="tpx_extra_absensi_ekstra1"><span id="el_extra_absensi_ekstra1">
    <select
        id="x_ekstra1"
        name="x_ekstra1"
        class="form-control ew-select<?= $Page->ekstra1->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_ekstra1"
        data-table="extra_absensi"
        data-field="x_ekstra1"
        data-value-separator="<?= $Page->ekstra1->displayValueSeparatorAttribute() ?>"
        <?= $Page->ekstra1->editAttributes() ?>>
        <?= $Page->ekstra1->selectOptionListHtml("x_ekstra1") ?>
    </select>
    <?= $Page->ekstra1->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->ekstra1->getErrorMessage() ?></div>
<?= $Page->ekstra1->Lookup->getParamTag($Page, "p_x_ekstra1") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_ekstra1']"),
        options = { name: "x_ekstra1", selectId: "extra_absensi_x_ekstra1", 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.extra_absensi.fields.ekstra1.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->deskripsi1->Visible) { // deskripsi1 ?>
    <div id="r_deskripsi1" class="form-group row">
        <label id="elh_extra_absensi_deskripsi1" for="x_deskripsi1" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_deskripsi1"><?= $Page->deskripsi1->caption() ?><?= $Page->deskripsi1->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->deskripsi1->cellAttributes() ?>>
<template id="tpx_extra_absensi_deskripsi1"><span id="el_extra_absensi_deskripsi1">
    <select
        id="x_deskripsi1"
        name="x_deskripsi1"
        class="form-control ew-select<?= $Page->deskripsi1->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_deskripsi1"
        data-table="extra_absensi"
        data-field="x_deskripsi1"
        data-value-separator="<?= $Page->deskripsi1->displayValueSeparatorAttribute() ?>"
        <?= $Page->deskripsi1->editAttributes() ?>>
        <?= $Page->deskripsi1->selectOptionListHtml("x_deskripsi1") ?>
    </select>
    <?= $Page->deskripsi1->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->deskripsi1->getErrorMessage() ?></div>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_deskripsi1']"),
        options = { name: "x_deskripsi1", selectId: "extra_absensi_x_deskripsi1", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.data = ew.vars.tables.extra_absensi.fields.deskripsi1.lookupOptions;
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.extra_absensi.fields.deskripsi1.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->ekstra2->Visible) { // ekstra2 ?>
    <div id="r_ekstra2" class="form-group row">
        <label id="elh_extra_absensi_ekstra2" for="x_ekstra2" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_ekstra2"><?= $Page->ekstra2->caption() ?><?= $Page->ekstra2->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->ekstra2->cellAttributes() ?>>
<template id="tpx_extra_absensi_ekstra2"><span id="el_extra_absensi_ekstra2">
    <select
        id="x_ekstra2"
        name="x_ekstra2"
        class="form-control ew-select<?= $Page->ekstra2->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_ekstra2"
        data-table="extra_absensi"
        data-field="x_ekstra2"
        data-value-separator="<?= $Page->ekstra2->displayValueSeparatorAttribute() ?>"
        <?= $Page->ekstra2->editAttributes() ?>>
        <?= $Page->ekstra2->selectOptionListHtml("x_ekstra2") ?>
    </select>
    <?= $Page->ekstra2->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->ekstra2->getErrorMessage() ?></div>
<?= $Page->ekstra2->Lookup->getParamTag($Page, "p_x_ekstra2") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_ekstra2']"),
        options = { name: "x_ekstra2", selectId: "extra_absensi_x_ekstra2", 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.extra_absensi.fields.ekstra2.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->deskripsi2->Visible) { // deskripsi2 ?>
    <div id="r_deskripsi2" class="form-group row">
        <label id="elh_extra_absensi_deskripsi2" for="x_deskripsi2" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_deskripsi2"><?= $Page->deskripsi2->caption() ?><?= $Page->deskripsi2->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->deskripsi2->cellAttributes() ?>>
<template id="tpx_extra_absensi_deskripsi2"><span id="el_extra_absensi_deskripsi2">
    <select
        id="x_deskripsi2"
        name="x_deskripsi2"
        class="form-control ew-select<?= $Page->deskripsi2->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_deskripsi2"
        data-table="extra_absensi"
        data-field="x_deskripsi2"
        data-value-separator="<?= $Page->deskripsi2->displayValueSeparatorAttribute() ?>"
        <?= $Page->deskripsi2->editAttributes() ?>>
        <?= $Page->deskripsi2->selectOptionListHtml("x_deskripsi2") ?>
    </select>
    <?= $Page->deskripsi2->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->deskripsi2->getErrorMessage() ?></div>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_deskripsi2']"),
        options = { name: "x_deskripsi2", selectId: "extra_absensi_x_deskripsi2", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.data = ew.vars.tables.extra_absensi.fields.deskripsi2.lookupOptions;
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.extra_absensi.fields.deskripsi2.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->ekstra3->Visible) { // ekstra3 ?>
    <div id="r_ekstra3" class="form-group row">
        <label id="elh_extra_absensi_ekstra3" for="x_ekstra3" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_ekstra3"><?= $Page->ekstra3->caption() ?><?= $Page->ekstra3->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->ekstra3->cellAttributes() ?>>
<template id="tpx_extra_absensi_ekstra3"><span id="el_extra_absensi_ekstra3">
    <select
        id="x_ekstra3"
        name="x_ekstra3"
        class="form-control ew-select<?= $Page->ekstra3->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_ekstra3"
        data-table="extra_absensi"
        data-field="x_ekstra3"
        data-value-separator="<?= $Page->ekstra3->displayValueSeparatorAttribute() ?>"
        <?= $Page->ekstra3->editAttributes() ?>>
        <?= $Page->ekstra3->selectOptionListHtml("x_ekstra3") ?>
    </select>
    <?= $Page->ekstra3->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->ekstra3->getErrorMessage() ?></div>
<?= $Page->ekstra3->Lookup->getParamTag($Page, "p_x_ekstra3") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_ekstra3']"),
        options = { name: "x_ekstra3", selectId: "extra_absensi_x_ekstra3", 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.extra_absensi.fields.ekstra3.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->deskripsi3->Visible) { // deskripsi3 ?>
    <div id="r_deskripsi3" class="form-group row">
        <label id="elh_extra_absensi_deskripsi3" for="x_deskripsi3" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_deskripsi3"><?= $Page->deskripsi3->caption() ?><?= $Page->deskripsi3->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->deskripsi3->cellAttributes() ?>>
<template id="tpx_extra_absensi_deskripsi3"><span id="el_extra_absensi_deskripsi3">
    <select
        id="x_deskripsi3"
        name="x_deskripsi3"
        class="form-control ew-select<?= $Page->deskripsi3->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_deskripsi3"
        data-table="extra_absensi"
        data-field="x_deskripsi3"
        data-value-separator="<?= $Page->deskripsi3->displayValueSeparatorAttribute() ?>"
        <?= $Page->deskripsi3->editAttributes() ?>>
        <?= $Page->deskripsi3->selectOptionListHtml("x_deskripsi3") ?>
    </select>
    <?= $Page->deskripsi3->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->deskripsi3->getErrorMessage() ?></div>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_deskripsi3']"),
        options = { name: "x_deskripsi3", selectId: "extra_absensi_x_deskripsi3", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.data = ew.vars.tables.extra_absensi.fields.deskripsi3.lookupOptions;
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.extra_absensi.fields.deskripsi3.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->ekstra4->Visible) { // ekstra4 ?>
    <div id="r_ekstra4" class="form-group row">
        <label id="elh_extra_absensi_ekstra4" for="x_ekstra4" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_ekstra4"><?= $Page->ekstra4->caption() ?><?= $Page->ekstra4->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->ekstra4->cellAttributes() ?>>
<template id="tpx_extra_absensi_ekstra4"><span id="el_extra_absensi_ekstra4">
    <select
        id="x_ekstra4"
        name="x_ekstra4"
        class="form-control ew-select<?= $Page->ekstra4->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_ekstra4"
        data-table="extra_absensi"
        data-field="x_ekstra4"
        data-value-separator="<?= $Page->ekstra4->displayValueSeparatorAttribute() ?>"
        <?= $Page->ekstra4->editAttributes() ?>>
        <?= $Page->ekstra4->selectOptionListHtml("x_ekstra4") ?>
    </select>
    <?= $Page->ekstra4->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->ekstra4->getErrorMessage() ?></div>
<?= $Page->ekstra4->Lookup->getParamTag($Page, "p_x_ekstra4") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_ekstra4']"),
        options = { name: "x_ekstra4", selectId: "extra_absensi_x_ekstra4", 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.extra_absensi.fields.ekstra4.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->deskripsi4->Visible) { // deskripsi4 ?>
    <div id="r_deskripsi4" class="form-group row">
        <label id="elh_extra_absensi_deskripsi4" for="x_deskripsi4" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_extra_absensi_deskripsi4"><?= $Page->deskripsi4->caption() ?><?= $Page->deskripsi4->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->deskripsi4->cellAttributes() ?>>
<template id="tpx_extra_absensi_deskripsi4"><span id="el_extra_absensi_deskripsi4">
    <select
        id="x_deskripsi4"
        name="x_deskripsi4"
        class="form-control ew-select<?= $Page->deskripsi4->isInvalidClass() ?>"
        data-select2-id="extra_absensi_x_deskripsi4"
        data-table="extra_absensi"
        data-field="x_deskripsi4"
        data-value-separator="<?= $Page->deskripsi4->displayValueSeparatorAttribute() ?>"
        <?= $Page->deskripsi4->editAttributes() ?>>
        <?= $Page->deskripsi4->selectOptionListHtml("x_deskripsi4") ?>
    </select>
    <?= $Page->deskripsi4->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->deskripsi4->getErrorMessage() ?></div>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='extra_absensi_x_deskripsi4']"),
        options = { name: "x_deskripsi4", selectId: "extra_absensi_x_deskripsi4", language: ew.LANGUAGE_ID, dir: ew.IS_RTL ? "rtl" : "ltr" };
    options.data = ew.vars.tables.extra_absensi.fields.deskripsi4.lookupOptions;
    options.dropdownParent = $(el).closest("#ew-modal-dialog, #ew-add-opt-dialog")[0];
    Object.assign(options, ew.vars.tables.extra_absensi.fields.deskripsi4.selectOptions);
    ew.createSelect(options);
});
</script>
</span></template>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
    <input type="hidden" data-table="extra_absensi" data-field="x_absen_id" data-hidden="1" name="x_absen_id" id="x_absen_id" value="<?= HtmlEncode($Page->absen_id->CurrentValue) ?>">
<div id="tpd_extra_absensiedit" class="ew-custom-template"></div>
<template id="tpm_extra_absensiedit">
<div id="ct_ExtraAbsensiEdit"><div class="row">
<div class="col-lg-6">
    <div id="r_kelas" class="form-group row">
        <label for="x_kelas" class="col-sm-2 col-form-label"><?= $Page->kelas->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_kelas"></slot></div>
    </div>
    <div id="r_nisn" class="form-group row">
        <label for="x_nisn" class="col-sm-2 col-form-label"><?= $Page->nisn->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_nisn"></slot></div>
    </div>
    <div id="r_nis" class="form-group row">
        <label for="x_nis" class="col-sm-2 col-form-label"><?= $Page->nis->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_nis"></slot></div>
    </div>
    <div id="r_nama" class="form-group row">
        <label for="x_nama" class="col-sm-2 col-form-label"><?= $Page->nama->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_nama"></slot></div>
    </div>
</div>
<div class="col-lg-6">
    <div id="r_jk" class="form-group row">
        <label for="x_jk" class="col-sm-2 col-form-label"><?= $Page->jk->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_jk"></slot></div>
    </div>
    <div id="r_s" class="form-group row">
        <label for="x_s" class="col-sm-2 col-form-label"><?= $Page->s->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_s"></slot></div>
    </div>
    <div id="r__i" class="form-group row">
        <label for="x__i" class="col-sm-2 col-form-label"><?= $Page->_i->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi__i"></slot></div>
    </div>
    <div id="r_a" class="form-group row">
        <label for="x_a" class="col-sm-2 col-form-label"><?= $Page->a->caption() ?></label>
        <div class="col-sm-10"><slot class="ew-slot" name="tpx_extra_absensi_a"></slot></div>
    </div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
	<div id="r_ekstra1" class="form-group row">
        <label for="x_ekstra1" class="col-sm-6 col-form-label"><?= $Page->ekstra1->caption() ?></label>
        <div class="col-sm-9"><slot class="ew-slot" name="tpx_extra_absensi_ekstra1"></slot></div>
    </div>
    <div id="r_ekstra2" class="form-group row">
        <label for="x_ekstra2" class="col-sm-6 col-form-label"><?= $Page->ekstra2->caption() ?></label>
        <div class="col-sm-9"><slot class="ew-slot" name="tpx_extra_absensi_ekstra2"></slot></div>
    </div>
    <div id="r_ekstra3" class="form-group row">
        <label for="x_ekstra3" class="col-sm-6 col-form-label"><?= $Page->ekstra3->caption() ?></label>
        <div class="col-sm-9"><slot class="ew-slot" name="tpx_extra_absensi_ekstra3"></slot></div>
    </div>
    <div id="r_ekstra4" class="form-group row">
        <label for="x_ekstra4" class="col-sm-6 col-form-label"><?= $Page->ekstra4->caption() ?></label>
        <div class="col-sm-9"><slot class="ew-slot" name="tpx_extra_absensi_ekstra4"></slot></div>
    </div>
</div>
<div class="col-lg-6">
    <div id="r_deskripsi1" class="form-group row">
        <label for="x_deskripsi1" class="col-sm-6 col-form-label"><?= $Page->deskripsi1->caption() ?></label>
        <div class="col-sm-9 w-auto"><slot class="ew-slot" name="tpx_extra_absensi_deskripsi1"></slot></div>
    </div>
    <div id="r_deskripsi2" class="form-group row">
        <label for="x_deskripsi2" class="col-sm-6 col-form-label"><?= $Page->deskripsi2->caption() ?></label>
        <div class="col-sm-9 w-auto"><slot class="ew-slot" name="tpx_extra_absensi_deskripsi2"></slot></div>
    </div>
    <div id="r_deskripsi3" class="form-group row">
        <label for="x_deskripsi3" class="col-sm-6 col-form-label"><?= $Page->deskripsi3->caption() ?></label>
        <div class="col-sm-9 w-auto"><slot class="ew-slot" name="tpx_extra_absensi_deskripsi3"></slot></div>
    </div>
    <div id="r_deskripsi4" class="form-group row">
        <label for="x_deskripsi4" class="col-sm-6 col-form-label"><?= $Page->deskripsi4->caption() ?></label>
        <div class="col-sm-9 w-auto"><slot class="ew-slot" name="tpx_extra_absensi_deskripsi4"></slot></div>
    </div>
</div>
</div>
</div>
</template>
<?php if (!$Page->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
    <div class="<?= $Page->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?= $Language->phrase("SaveBtn") ?></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><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
</form>
<script class="ew-apply-template">
loadjs.ready(["jsrender", "makerjs"], function() {
    ew.templateData = { rows: <?= JsonEncode($Page->Rows) ?> };
    ew.applyTemplate("tpd_extra_absensiedit", "tpm_extra_absensiedit", "extra_absensiedit", "<?= $Page->CustomExport ?>", ew.templateData.rows[0]);
    loadjs.done("customtemplate");
});
</script>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("extra_absensi");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
