<?php

namespace PHPMaker2021\rdigital21;

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

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "peserta_didik")) ?>,
        fields = currentTable.fields;
    if (!ew.vars.tables.peserta_didik)
        ew.vars.tables.peserta_didik = currentTable;
    fpeserta_didikedit.addFields([
        ["pd_id", [fields.pd_id.visible && fields.pd_id.required ? ew.Validators.required(fields.pd_id.caption) : null], fields.pd_id.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],
        ["tmp_lahir", [fields.tmp_lahir.visible && fields.tmp_lahir.required ? ew.Validators.required(fields.tmp_lahir.caption) : null], fields.tmp_lahir.isInvalid],
        ["tgl_lahir", [fields.tgl_lahir.visible && fields.tgl_lahir.required ? ew.Validators.required(fields.tgl_lahir.caption) : null], fields.tgl_lahir.isInvalid],
        ["agama", [fields.agama.visible && fields.agama.required ? ew.Validators.required(fields.agama.caption) : null], fields.agama.isInvalid],
        ["status", [fields.status.visible && fields.status.required ? ew.Validators.required(fields.status.caption) : null], fields.status.isInvalid],
        ["anak_ke", [fields.anak_ke.visible && fields.anak_ke.required ? ew.Validators.required(fields.anak_ke.caption) : null], fields.anak_ke.isInvalid],
        ["alamat_siswa", [fields.alamat_siswa.visible && fields.alamat_siswa.required ? ew.Validators.required(fields.alamat_siswa.caption) : null], fields.alamat_siswa.isInvalid],
        ["no_hp", [fields.no_hp.visible && fields.no_hp.required ? ew.Validators.required(fields.no_hp.caption) : null], fields.no_hp.isInvalid],
        ["sekolah_asal", [fields.sekolah_asal.visible && fields.sekolah_asal.required ? ew.Validators.required(fields.sekolah_asal.caption) : null], fields.sekolah_asal.isInvalid],
        ["diterima_di_kls", [fields.diterima_di_kls.visible && fields.diterima_di_kls.required ? ew.Validators.required(fields.diterima_di_kls.caption) : null], fields.diterima_di_kls.isInvalid],
        ["tanggal", [fields.tanggal.visible && fields.tanggal.required ? ew.Validators.required(fields.tanggal.caption) : null], fields.tanggal.isInvalid],
        ["nama_ayah", [fields.nama_ayah.visible && fields.nama_ayah.required ? ew.Validators.required(fields.nama_ayah.caption) : null], fields.nama_ayah.isInvalid],
        ["nama_ibu", [fields.nama_ibu.visible && fields.nama_ibu.required ? ew.Validators.required(fields.nama_ibu.caption) : null], fields.nama_ibu.isInvalid],
        ["alamat", [fields.alamat.visible && fields.alamat.required ? ew.Validators.required(fields.alamat.caption) : null], fields.alamat.isInvalid],
        ["telepon", [fields.telepon.visible && fields.telepon.required ? ew.Validators.required(fields.telepon.caption) : null], fields.telepon.isInvalid],
        ["kerja_ayah", [fields.kerja_ayah.visible && fields.kerja_ayah.required ? ew.Validators.required(fields.kerja_ayah.caption) : null], fields.kerja_ayah.isInvalid],
        ["kerja_ibu", [fields.kerja_ibu.visible && fields.kerja_ibu.required ? ew.Validators.required(fields.kerja_ibu.caption) : null], fields.kerja_ibu.isInvalid],
        ["nama_wali", [fields.nama_wali.visible && fields.nama_wali.required ? ew.Validators.required(fields.nama_wali.caption) : null], fields.nama_wali.isInvalid],
        ["no_telepon", [fields.no_telepon.visible && fields.no_telepon.required ? ew.Validators.required(fields.no_telepon.caption) : null], fields.no_telepon.isInvalid],
        ["alamat_wali", [fields.alamat_wali.visible && fields.alamat_wali.required ? ew.Validators.required(fields.alamat_wali.caption) : null], fields.alamat_wali.isInvalid],
        ["kerja_wali", [fields.kerja_wali.visible && fields.kerja_wali.required ? ew.Validators.required(fields.kerja_wali.caption) : null], fields.kerja_wali.isInvalid]
    ]);

    // Set invalid fields
    $(function() {
        var f = fpeserta_didikedit,
            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
    fpeserta_didikedit.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
    fpeserta_didikedit.customValidate = function(fobj) { // DO NOT CHANGE THIS LINE!
        // Your custom validation code here, return false if invalid.
        return true;
    }

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

    // Dynamic selection lists
    fpeserta_didikedit.lists.kelas = <?= $Page->kelas->toClientList($Page) ?>;
    loadjs.done("fpeserta_didikedit");
});
</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="fpeserta_didikedit" id="fpeserta_didikedit" 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="peserta_didik">
<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"><!-- page* -->
<?php if ($Page->pd_id->Visible) { // pd_id ?>
    <div id="r_pd_id" class="form-group row">
        <label id="elh_peserta_didik_pd_id" class="<?= $Page->LeftColumnClass ?>"><?= $Page->pd_id->caption() ?><?= $Page->pd_id->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->pd_id->cellAttributes() ?>>
<span id="el_peserta_didik_pd_id">
<span<?= $Page->pd_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->pd_id->getDisplayValue($Page->pd_id->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="peserta_didik" data-field="x_pd_id" data-hidden="1" name="x_pd_id" id="x_pd_id" value="<?= HtmlEncode($Page->pd_id->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kelas->Visible) { // kelas ?>
    <div id="r_kelas" class="form-group row">
        <label id="elh_peserta_didik_kelas" for="x_kelas" class="<?= $Page->LeftColumnClass ?>"><?= $Page->kelas->caption() ?><?= $Page->kelas->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kelas->cellAttributes() ?>>
<?php if (!$Security->isAdmin() && $Security->isLoggedIn() && !$Page->userIDAllow("edit")) { // Non system admin ?>
<span id="el_peserta_didik_kelas">
<span<?= $Page->kelas->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kelas->getDisplayValue($Page->kelas->EditValue))) ?>"></span>
</span>
<input type="hidden" data-table="peserta_didik" data-field="x_kelas" data-hidden="1" name="x_kelas" id="x_kelas" value="<?= HtmlEncode($Page->kelas->CurrentValue) ?>">
<?php } else { ?>
<span id="el_peserta_didik_kelas">
    <select
        id="x_kelas"
        name="x_kelas"
        class="form-control ew-select<?= $Page->kelas->isInvalidClass() ?>"
        data-select2-id="peserta_didik_x_kelas"
        data-table="peserta_didik"
        data-field="x_kelas"
        data-value-separator="<?= $Page->kelas->displayValueSeparatorAttribute() ?>"
        <?= $Page->kelas->editAttributes() ?>>
        <?= $Page->kelas->selectOptionListHtml("x_kelas") ?>
    </select>
    <?= $Page->kelas->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->kelas->getErrorMessage() ?></div>
<?= $Page->kelas->Lookup->getParamTag($Page, "p_x_kelas") ?>
<script>
loadjs.ready("head", function() {
    var el = document.querySelector("select[data-select2-id='peserta_didik_x_kelas']"),
        options = { name: "x_kelas", selectId: "peserta_didik_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.peserta_didik.fields.kelas.selectOptions);
    ew.createSelect(options);
});
</script>
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nisn->Visible) { // nisn ?>
    <div id="r_nisn" class="form-group row">
        <label id="elh_peserta_didik_nisn" for="x_nisn" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nisn->caption() ?><?= $Page->nisn->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nisn->cellAttributes() ?>>
<span id="el_peserta_didik_nisn">
<input type="<?= $Page->nisn->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nisn" name="x_nisn" id="x_nisn" value="<?= $Page->nisn->EditValue ?>"<?= $Page->nisn->editAttributes() ?> aria-describedby="x_nisn_help">
<?= $Page->nisn->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nisn->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nis->Visible) { // nis ?>
    <div id="r_nis" class="form-group row">
        <label id="elh_peserta_didik_nis" for="x_nis" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nis->caption() ?><?= $Page->nis->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nis->cellAttributes() ?>>
<span id="el_peserta_didik_nis">
<input type="<?= $Page->nis->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nis" name="x_nis" id="x_nis" value="<?= $Page->nis->EditValue ?>"<?= $Page->nis->editAttributes() ?> aria-describedby="x_nis_help">
<?= $Page->nis->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nis->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
    <div id="r_nama" class="form-group row">
        <label id="elh_peserta_didik_nama" for="x_nama" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nama->caption() ?><?= $Page->nama->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama->cellAttributes() ?>>
<span id="el_peserta_didik_nama">
<input type="<?= $Page->nama->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nama" name="x_nama" id="x_nama" value="<?= $Page->nama->EditValue ?>"<?= $Page->nama->editAttributes() ?> aria-describedby="x_nama_help">
<?= $Page->nama->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nama->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->jk->Visible) { // jk ?>
    <div id="r_jk" class="form-group row">
        <label id="elh_peserta_didik_jk" for="x_jk" class="<?= $Page->LeftColumnClass ?>"><?= $Page->jk->caption() ?><?= $Page->jk->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->jk->cellAttributes() ?>>
<span id="el_peserta_didik_jk">
<input type="<?= $Page->jk->getInputTextType() ?>" data-table="peserta_didik" data-field="x_jk" name="x_jk" id="x_jk" value="<?= $Page->jk->EditValue ?>"<?= $Page->jk->editAttributes() ?> aria-describedby="x_jk_help">
<?= $Page->jk->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->jk->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->tmp_lahir->Visible) { // tmp_lahir ?>
    <div id="r_tmp_lahir" class="form-group row">
        <label id="elh_peserta_didik_tmp_lahir" for="x_tmp_lahir" class="<?= $Page->LeftColumnClass ?>"><?= $Page->tmp_lahir->caption() ?><?= $Page->tmp_lahir->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->tmp_lahir->cellAttributes() ?>>
<span id="el_peserta_didik_tmp_lahir">
<input type="<?= $Page->tmp_lahir->getInputTextType() ?>" data-table="peserta_didik" data-field="x_tmp_lahir" name="x_tmp_lahir" id="x_tmp_lahir" value="<?= $Page->tmp_lahir->EditValue ?>"<?= $Page->tmp_lahir->editAttributes() ?> aria-describedby="x_tmp_lahir_help">
<?= $Page->tmp_lahir->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->tmp_lahir->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->tgl_lahir->Visible) { // tgl_lahir ?>
    <div id="r_tgl_lahir" class="form-group row">
        <label id="elh_peserta_didik_tgl_lahir" for="x_tgl_lahir" class="<?= $Page->LeftColumnClass ?>"><?= $Page->tgl_lahir->caption() ?><?= $Page->tgl_lahir->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->tgl_lahir->cellAttributes() ?>>
<span id="el_peserta_didik_tgl_lahir">
<input type="<?= $Page->tgl_lahir->getInputTextType() ?>" data-table="peserta_didik" data-field="x_tgl_lahir" name="x_tgl_lahir" id="x_tgl_lahir" value="<?= $Page->tgl_lahir->EditValue ?>"<?= $Page->tgl_lahir->editAttributes() ?> aria-describedby="x_tgl_lahir_help">
<?= $Page->tgl_lahir->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->tgl_lahir->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->agama->Visible) { // agama ?>
    <div id="r_agama" class="form-group row">
        <label id="elh_peserta_didik_agama" for="x_agama" class="<?= $Page->LeftColumnClass ?>"><?= $Page->agama->caption() ?><?= $Page->agama->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->agama->cellAttributes() ?>>
<span id="el_peserta_didik_agama">
<input type="<?= $Page->agama->getInputTextType() ?>" data-table="peserta_didik" data-field="x_agama" name="x_agama" id="x_agama" value="<?= $Page->agama->EditValue ?>"<?= $Page->agama->editAttributes() ?> aria-describedby="x_agama_help">
<?= $Page->agama->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->agama->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->status->Visible) { // status ?>
    <div id="r_status" class="form-group row">
        <label id="elh_peserta_didik_status" for="x_status" class="<?= $Page->LeftColumnClass ?>"><?= $Page->status->caption() ?><?= $Page->status->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->status->cellAttributes() ?>>
<span id="el_peserta_didik_status">
<input type="<?= $Page->status->getInputTextType() ?>" data-table="peserta_didik" data-field="x_status" name="x_status" id="x_status" value="<?= $Page->status->EditValue ?>"<?= $Page->status->editAttributes() ?> aria-describedby="x_status_help">
<?= $Page->status->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->status->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->anak_ke->Visible) { // anak_ke ?>
    <div id="r_anak_ke" class="form-group row">
        <label id="elh_peserta_didik_anak_ke" for="x_anak_ke" class="<?= $Page->LeftColumnClass ?>"><?= $Page->anak_ke->caption() ?><?= $Page->anak_ke->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->anak_ke->cellAttributes() ?>>
<span id="el_peserta_didik_anak_ke">
<input type="<?= $Page->anak_ke->getInputTextType() ?>" data-table="peserta_didik" data-field="x_anak_ke" name="x_anak_ke" id="x_anak_ke" value="<?= $Page->anak_ke->EditValue ?>"<?= $Page->anak_ke->editAttributes() ?> aria-describedby="x_anak_ke_help">
<?= $Page->anak_ke->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->anak_ke->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->alamat_siswa->Visible) { // alamat_siswa ?>
    <div id="r_alamat_siswa" class="form-group row">
        <label id="elh_peserta_didik_alamat_siswa" for="x_alamat_siswa" class="<?= $Page->LeftColumnClass ?>"><?= $Page->alamat_siswa->caption() ?><?= $Page->alamat_siswa->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->alamat_siswa->cellAttributes() ?>>
<span id="el_peserta_didik_alamat_siswa">
<input type="<?= $Page->alamat_siswa->getInputTextType() ?>" data-table="peserta_didik" data-field="x_alamat_siswa" name="x_alamat_siswa" id="x_alamat_siswa" value="<?= $Page->alamat_siswa->EditValue ?>"<?= $Page->alamat_siswa->editAttributes() ?> aria-describedby="x_alamat_siswa_help">
<?= $Page->alamat_siswa->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->alamat_siswa->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->no_hp->Visible) { // no_hp ?>
    <div id="r_no_hp" class="form-group row">
        <label id="elh_peserta_didik_no_hp" for="x_no_hp" class="<?= $Page->LeftColumnClass ?>"><?= $Page->no_hp->caption() ?><?= $Page->no_hp->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->no_hp->cellAttributes() ?>>
<span id="el_peserta_didik_no_hp">
<input type="<?= $Page->no_hp->getInputTextType() ?>" data-table="peserta_didik" data-field="x_no_hp" name="x_no_hp" id="x_no_hp" value="<?= $Page->no_hp->EditValue ?>"<?= $Page->no_hp->editAttributes() ?> aria-describedby="x_no_hp_help">
<?= $Page->no_hp->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->no_hp->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->sekolah_asal->Visible) { // sekolah_asal ?>
    <div id="r_sekolah_asal" class="form-group row">
        <label id="elh_peserta_didik_sekolah_asal" for="x_sekolah_asal" class="<?= $Page->LeftColumnClass ?>"><?= $Page->sekolah_asal->caption() ?><?= $Page->sekolah_asal->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->sekolah_asal->cellAttributes() ?>>
<span id="el_peserta_didik_sekolah_asal">
<input type="<?= $Page->sekolah_asal->getInputTextType() ?>" data-table="peserta_didik" data-field="x_sekolah_asal" name="x_sekolah_asal" id="x_sekolah_asal" value="<?= $Page->sekolah_asal->EditValue ?>"<?= $Page->sekolah_asal->editAttributes() ?> aria-describedby="x_sekolah_asal_help">
<?= $Page->sekolah_asal->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->sekolah_asal->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->diterima_di_kls->Visible) { // diterima_di_kls ?>
    <div id="r_diterima_di_kls" class="form-group row">
        <label id="elh_peserta_didik_diterima_di_kls" for="x_diterima_di_kls" class="<?= $Page->LeftColumnClass ?>"><?= $Page->diterima_di_kls->caption() ?><?= $Page->diterima_di_kls->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->diterima_di_kls->cellAttributes() ?>>
<span id="el_peserta_didik_diterima_di_kls">
<input type="<?= $Page->diterima_di_kls->getInputTextType() ?>" data-table="peserta_didik" data-field="x_diterima_di_kls" name="x_diterima_di_kls" id="x_diterima_di_kls" value="<?= $Page->diterima_di_kls->EditValue ?>"<?= $Page->diterima_di_kls->editAttributes() ?> aria-describedby="x_diterima_di_kls_help">
<?= $Page->diterima_di_kls->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->diterima_di_kls->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->tanggal->Visible) { // tanggal ?>
    <div id="r_tanggal" class="form-group row">
        <label id="elh_peserta_didik_tanggal" for="x_tanggal" class="<?= $Page->LeftColumnClass ?>"><?= $Page->tanggal->caption() ?><?= $Page->tanggal->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->tanggal->cellAttributes() ?>>
<span id="el_peserta_didik_tanggal">
<input type="<?= $Page->tanggal->getInputTextType() ?>" data-table="peserta_didik" data-field="x_tanggal" name="x_tanggal" id="x_tanggal" value="<?= $Page->tanggal->EditValue ?>"<?= $Page->tanggal->editAttributes() ?> aria-describedby="x_tanggal_help">
<?= $Page->tanggal->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->tanggal->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama_ayah->Visible) { // nama_ayah ?>
    <div id="r_nama_ayah" class="form-group row">
        <label id="elh_peserta_didik_nama_ayah" for="x_nama_ayah" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nama_ayah->caption() ?><?= $Page->nama_ayah->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama_ayah->cellAttributes() ?>>
<span id="el_peserta_didik_nama_ayah">
<input type="<?= $Page->nama_ayah->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nama_ayah" name="x_nama_ayah" id="x_nama_ayah" value="<?= $Page->nama_ayah->EditValue ?>"<?= $Page->nama_ayah->editAttributes() ?> aria-describedby="x_nama_ayah_help">
<?= $Page->nama_ayah->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nama_ayah->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama_ibu->Visible) { // nama_ibu ?>
    <div id="r_nama_ibu" class="form-group row">
        <label id="elh_peserta_didik_nama_ibu" for="x_nama_ibu" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nama_ibu->caption() ?><?= $Page->nama_ibu->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama_ibu->cellAttributes() ?>>
<span id="el_peserta_didik_nama_ibu">
<input type="<?= $Page->nama_ibu->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nama_ibu" name="x_nama_ibu" id="x_nama_ibu" value="<?= $Page->nama_ibu->EditValue ?>"<?= $Page->nama_ibu->editAttributes() ?> aria-describedby="x_nama_ibu_help">
<?= $Page->nama_ibu->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nama_ibu->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->alamat->Visible) { // alamat ?>
    <div id="r_alamat" class="form-group row">
        <label id="elh_peserta_didik_alamat" for="x_alamat" class="<?= $Page->LeftColumnClass ?>"><?= $Page->alamat->caption() ?><?= $Page->alamat->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->alamat->cellAttributes() ?>>
<span id="el_peserta_didik_alamat">
<input type="<?= $Page->alamat->getInputTextType() ?>" data-table="peserta_didik" data-field="x_alamat" name="x_alamat" id="x_alamat" value="<?= $Page->alamat->EditValue ?>"<?= $Page->alamat->editAttributes() ?> aria-describedby="x_alamat_help">
<?= $Page->alamat->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->alamat->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->telepon->Visible) { // telepon ?>
    <div id="r_telepon" class="form-group row">
        <label id="elh_peserta_didik_telepon" for="x_telepon" class="<?= $Page->LeftColumnClass ?>"><?= $Page->telepon->caption() ?><?= $Page->telepon->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->telepon->cellAttributes() ?>>
<span id="el_peserta_didik_telepon">
<input type="<?= $Page->telepon->getInputTextType() ?>" data-table="peserta_didik" data-field="x_telepon" name="x_telepon" id="x_telepon" value="<?= $Page->telepon->EditValue ?>"<?= $Page->telepon->editAttributes() ?> aria-describedby="x_telepon_help">
<?= $Page->telepon->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->telepon->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kerja_ayah->Visible) { // kerja_ayah ?>
    <div id="r_kerja_ayah" class="form-group row">
        <label id="elh_peserta_didik_kerja_ayah" for="x_kerja_ayah" class="<?= $Page->LeftColumnClass ?>"><?= $Page->kerja_ayah->caption() ?><?= $Page->kerja_ayah->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kerja_ayah->cellAttributes() ?>>
<span id="el_peserta_didik_kerja_ayah">
<input type="<?= $Page->kerja_ayah->getInputTextType() ?>" data-table="peserta_didik" data-field="x_kerja_ayah" name="x_kerja_ayah" id="x_kerja_ayah" value="<?= $Page->kerja_ayah->EditValue ?>"<?= $Page->kerja_ayah->editAttributes() ?> aria-describedby="x_kerja_ayah_help">
<?= $Page->kerja_ayah->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->kerja_ayah->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kerja_ibu->Visible) { // kerja_ibu ?>
    <div id="r_kerja_ibu" class="form-group row">
        <label id="elh_peserta_didik_kerja_ibu" for="x_kerja_ibu" class="<?= $Page->LeftColumnClass ?>"><?= $Page->kerja_ibu->caption() ?><?= $Page->kerja_ibu->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kerja_ibu->cellAttributes() ?>>
<span id="el_peserta_didik_kerja_ibu">
<input type="<?= $Page->kerja_ibu->getInputTextType() ?>" data-table="peserta_didik" data-field="x_kerja_ibu" name="x_kerja_ibu" id="x_kerja_ibu" value="<?= $Page->kerja_ibu->EditValue ?>"<?= $Page->kerja_ibu->editAttributes() ?> aria-describedby="x_kerja_ibu_help">
<?= $Page->kerja_ibu->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->kerja_ibu->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama_wali->Visible) { // nama_wali ?>
    <div id="r_nama_wali" class="form-group row">
        <label id="elh_peserta_didik_nama_wali" for="x_nama_wali" class="<?= $Page->LeftColumnClass ?>"><?= $Page->nama_wali->caption() ?><?= $Page->nama_wali->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama_wali->cellAttributes() ?>>
<span id="el_peserta_didik_nama_wali">
<input type="<?= $Page->nama_wali->getInputTextType() ?>" data-table="peserta_didik" data-field="x_nama_wali" name="x_nama_wali" id="x_nama_wali" value="<?= $Page->nama_wali->EditValue ?>"<?= $Page->nama_wali->editAttributes() ?> aria-describedby="x_nama_wali_help">
<?= $Page->nama_wali->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->nama_wali->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->no_telepon->Visible) { // no_telepon ?>
    <div id="r_no_telepon" class="form-group row">
        <label id="elh_peserta_didik_no_telepon" for="x_no_telepon" class="<?= $Page->LeftColumnClass ?>"><?= $Page->no_telepon->caption() ?><?= $Page->no_telepon->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->no_telepon->cellAttributes() ?>>
<span id="el_peserta_didik_no_telepon">
<input type="<?= $Page->no_telepon->getInputTextType() ?>" data-table="peserta_didik" data-field="x_no_telepon" name="x_no_telepon" id="x_no_telepon" value="<?= $Page->no_telepon->EditValue ?>"<?= $Page->no_telepon->editAttributes() ?> aria-describedby="x_no_telepon_help">
<?= $Page->no_telepon->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->no_telepon->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->alamat_wali->Visible) { // alamat_wali ?>
    <div id="r_alamat_wali" class="form-group row">
        <label id="elh_peserta_didik_alamat_wali" for="x_alamat_wali" class="<?= $Page->LeftColumnClass ?>"><?= $Page->alamat_wali->caption() ?><?= $Page->alamat_wali->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->alamat_wali->cellAttributes() ?>>
<span id="el_peserta_didik_alamat_wali">
<input type="<?= $Page->alamat_wali->getInputTextType() ?>" data-table="peserta_didik" data-field="x_alamat_wali" name="x_alamat_wali" id="x_alamat_wali" maxlength="255" value="<?= $Page->alamat_wali->EditValue ?>"<?= $Page->alamat_wali->editAttributes() ?> aria-describedby="x_alamat_wali_help">
<?= $Page->alamat_wali->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->alamat_wali->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kerja_wali->Visible) { // kerja_wali ?>
    <div id="r_kerja_wali" class="form-group row">
        <label id="elh_peserta_didik_kerja_wali" for="x_kerja_wali" class="<?= $Page->LeftColumnClass ?>"><?= $Page->kerja_wali->caption() ?><?= $Page->kerja_wali->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kerja_wali->cellAttributes() ?>>
<span id="el_peserta_didik_kerja_wali">
<input type="<?= $Page->kerja_wali->getInputTextType() ?>" data-table="peserta_didik" data-field="x_kerja_wali" name="x_kerja_wali" id="x_kerja_wali" maxlength="255" value="<?= $Page->kerja_wali->EditValue ?>"<?= $Page->kerja_wali->editAttributes() ?> aria-describedby="x_kerja_wali_help">
<?= $Page->kerja_wali->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->kerja_wali->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
<?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>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("peserta_didik");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
