<?php

namespace PHPMaker2021\rdigital21;

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

    // Add fields
    var currentTable = <?= JsonEncode(GetClientVar("tables", "nilai_sumatif")) ?>,
        fields = currentTable.fields;
    if (!ew.vars.tables.nilai_sumatif)
        ew.vars.tables.nilai_sumatif = currentTable;
    fnilai_sumatifedit.addFields([
        ["nilai_s_id", [fields.nilai_s_id.visible && fields.nilai_s_id.required ? ew.Validators.required(fields.nilai_s_id.caption) : null], fields.nilai_s_id.isInvalid],
        ["kode_tapel", [fields.kode_tapel.visible && fields.kode_tapel.required ? ew.Validators.required(fields.kode_tapel.caption) : null], fields.kode_tapel.isInvalid],
        ["penilaian_id", [fields.penilaian_id.visible && fields.penilaian_id.required ? ew.Validators.required(fields.penilaian_id.caption) : null], fields.penilaian_id.isInvalid],
        ["guru_id", [fields.guru_id.visible && fields.guru_id.required ? ew.Validators.required(fields.guru_id.caption) : null], fields.guru_id.isInvalid],
        ["kode_mapel", [fields.kode_mapel.visible && fields.kode_mapel.required ? ew.Validators.required(fields.kode_mapel.caption) : null], fields.kode_mapel.isInvalid],
        ["kelas", [fields.kelas.visible && fields.kelas.required ? ew.Validators.required(fields.kelas.caption) : null], fields.kelas.isInvalid],
        ["nis", [fields.nis.visible && fields.nis.required ? ew.Validators.required(fields.nis.caption) : null], fields.nis.isInvalid],
        ["nisn", [fields.nisn.visible && fields.nisn.required ? ew.Validators.required(fields.nisn.caption) : null], fields.nisn.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],
        ["s1", [fields.s1.visible && fields.s1.required ? ew.Validators.required(fields.s1.caption) : null], fields.s1.isInvalid],
        ["s2", [fields.s2.visible && fields.s2.required ? ew.Validators.required(fields.s2.caption) : null], fields.s2.isInvalid],
        ["s3", [fields.s3.visible && fields.s3.required ? ew.Validators.required(fields.s3.caption) : null], fields.s3.isInvalid],
        ["s4", [fields.s4.visible && fields.s4.required ? ew.Validators.required(fields.s4.caption) : null], fields.s4.isInvalid],
        ["s5", [fields.s5.visible && fields.s5.required ? ew.Validators.required(fields.s5.caption) : null], fields.s5.isInvalid],
        ["s6", [fields.s6.visible && fields.s6.required ? ew.Validators.required(fields.s6.caption) : null], fields.s6.isInvalid],
        ["s7", [fields.s7.visible && fields.s7.required ? ew.Validators.required(fields.s7.caption) : null], fields.s7.isInvalid],
        ["s8", [fields.s8.visible && fields.s8.required ? ew.Validators.required(fields.s8.caption) : null], fields.s8.isInvalid],
        ["nas", [fields.nas.visible && fields.nas.required ? ew.Validators.required(fields.nas.caption) : null], fields.nas.isInvalid],
        ["sts", [fields.sts.visible && fields.sts.required ? ew.Validators.required(fields.sts.caption) : null], fields.sts.isInvalid],
        ["sas", [fields.sas.visible && fields.sas.required ? ew.Validators.required(fields.sas.caption) : null], fields.sas.isInvalid],
        ["nr1", [fields.nr1.visible && fields.nr1.required ? ew.Validators.required(fields.nr1.caption) : null], fields.nr1.isInvalid],
        ["nr2", [fields.nr2.visible && fields.nr2.required ? ew.Validators.required(fields.nr2.caption) : null], fields.nr2.isInvalid]
    ]);

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

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

    // Dynamic selection lists
    loadjs.done("fnilai_sumatifedit");
});
</script>
<script>
loadjs.ready("head", function () {
    // Client script
    $(document).ready((function(){$("#x_s1, #x_s2, #x_s3, #x_s4, #x_s5, #x_s6, #x_s7, #x_s8, #x_sts, #x_sas").change((function(){for(var s=[parseInt($("#x_s1").val())||0,parseInt($("#x_s2").val())||0,parseInt($("#x_s3").val())||0,parseInt($("#x_s4").val())||0,parseInt($("#x_s5").val())||0,parseInt($("#x_s6").val())||0,parseInt($("#x_s7").val())||0,parseInt($("#x_s8").val())||0],a=0,x=0,_=0;_<s.length;_++)0!==s[_]&&(a+=s[_],x++);var n=x>0?(a/x).toFixed(0):0;$("#x_nas").val(n);var t=parseInt($("#x_sts").val())||0,e=parseInt($("#x_sas").val())||0,r=((2*n+t+2*e)/5).toFixed(2),v=((2*n+t+2*e)/5).toFixed(0);$("#x_nr1").val(r),$("#x_nr2").val(v)}))}));
});
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fnilai_sumatifedit" id="fnilai_sumatifedit" 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="nilai_sumatif">
<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 ?>">
<?php if ($Page->getCurrentMasterTable() == "penilaian") { ?>
<input type="hidden" name="<?= Config("TABLE_SHOW_MASTER") ?>" value="penilaian">
<input type="hidden" name="fk_penilaian_id" value="<?= HtmlEncode($Page->penilaian_id->getSessionValue()) ?>">
<?php } ?>
<div class="ew-edit-div d-none"><!-- page* -->
<?php if ($Page->nilai_s_id->Visible) { // nilai_s_id ?>
    <div id="r_nilai_s_id" class="form-group row">
        <label id="elh_nilai_sumatif_nilai_s_id" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nilai_s_id"><?= $Page->nilai_s_id->caption() ?><?= $Page->nilai_s_id->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nilai_s_id->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nilai_s_id"><span id="el_nilai_sumatif_nilai_s_id">
<span<?= $Page->nilai_s_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->nilai_s_id->getDisplayValue($Page->nilai_s_id->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="nilai_sumatif" data-field="x_nilai_s_id" data-hidden="1" name="x_nilai_s_id" id="x_nilai_s_id" value="<?= HtmlEncode($Page->nilai_s_id->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
    <div id="r_kode_tapel" class="form-group row">
        <label id="elh_nilai_sumatif_kode_tapel" for="x_kode_tapel" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_kode_tapel"><?= $Page->kode_tapel->caption() ?><?= $Page->kode_tapel->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kode_tapel->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_kode_tapel"><span id="el_nilai_sumatif_kode_tapel">
<span<?= $Page->kode_tapel->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kode_tapel->getDisplayValue($Page->kode_tapel->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="nilai_sumatif" data-field="x_kode_tapel" data-hidden="1" name="x_kode_tapel" id="x_kode_tapel" value="<?= HtmlEncode($Page->kode_tapel->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->penilaian_id->Visible) { // penilaian_id ?>
    <div id="r_penilaian_id" class="form-group row">
        <label id="elh_nilai_sumatif_penilaian_id" for="x_penilaian_id" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_penilaian_id"><?= $Page->penilaian_id->caption() ?><?= $Page->penilaian_id->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->penilaian_id->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_penilaian_id"><span id="el_nilai_sumatif_penilaian_id">
<span<?= $Page->penilaian_id->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->penilaian_id->getDisplayValue($Page->penilaian_id->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="nilai_sumatif" data-field="x_penilaian_id" data-hidden="1" name="x_penilaian_id" id="x_penilaian_id" value="<?= HtmlEncode($Page->penilaian_id->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->guru_id->Visible) { // guru_id ?>
    <div id="r_guru_id" class="form-group row">
        <label id="elh_nilai_sumatif_guru_id" for="x_guru_id" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_guru_id"><?= $Page->guru_id->caption() ?><?= $Page->guru_id->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->guru_id->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_guru_id"><span id="el_nilai_sumatif_guru_id">
<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></template>
<input type="hidden" data-table="nilai_sumatif" data-field="x_guru_id" data-hidden="1" name="x_guru_id" id="x_guru_id" value="<?= HtmlEncode($Page->guru_id->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kode_mapel->Visible) { // kode_mapel ?>
    <div id="r_kode_mapel" class="form-group row">
        <label id="elh_nilai_sumatif_kode_mapel" for="x_kode_mapel" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_kode_mapel"><?= $Page->kode_mapel->caption() ?><?= $Page->kode_mapel->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kode_mapel->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_kode_mapel"><span id="el_nilai_sumatif_kode_mapel">
<span<?= $Page->kode_mapel->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->kode_mapel->getDisplayValue($Page->kode_mapel->EditValue))) ?>"></span>
</span></template>
<input type="hidden" data-table="nilai_sumatif" data-field="x_kode_mapel" data-hidden="1" name="x_kode_mapel" id="x_kode_mapel" value="<?= HtmlEncode($Page->kode_mapel->CurrentValue) ?>">
</div></div>
    </div>
<?php } ?>
<?php if ($Page->kelas->Visible) { // kelas ?>
    <div id="r_kelas" class="form-group row">
        <label id="elh_nilai_sumatif_kelas" for="x_kelas" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_kelas"><?= $Page->kelas->caption() ?><?= $Page->kelas->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->kelas->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_kelas"><span id="el_nilai_sumatif_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="nilai_sumatif" 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->nis->Visible) { // nis ?>
    <div id="r_nis" class="form-group row">
        <label id="elh_nilai_sumatif_nis" for="x_nis" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nis"><?= $Page->nis->caption() ?><?= $Page->nis->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nis->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nis"><span id="el_nilai_sumatif_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="nilai_sumatif" 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->nisn->Visible) { // nisn ?>
    <div id="r_nisn" class="form-group row">
        <label id="elh_nilai_sumatif_nisn" for="x_nisn" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nisn"><?= $Page->nisn->caption() ?><?= $Page->nisn->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nisn->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nisn"><span id="el_nilai_sumatif_nisn">
<input type="<?= $Page->nisn->getInputTextType() ?>" data-table="nilai_sumatif" 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></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
    <div id="r_nama" class="form-group row">
        <label id="elh_nilai_sumatif_nama" for="x_nama" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nama"><?= $Page->nama->caption() ?><?= $Page->nama->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nama->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nama"><span id="el_nilai_sumatif_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="nilai_sumatif" 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_nilai_sumatif_jk" for="x_jk" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_jk"><?= $Page->jk->caption() ?><?= $Page->jk->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->jk->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_jk"><span id="el_nilai_sumatif_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="nilai_sumatif" 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->s1->Visible) { // s1 ?>
    <div id="r_s1" class="form-group row">
        <label id="elh_nilai_sumatif_s1" for="x_s1" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s1"><?= $Page->s1->caption() ?><?= $Page->s1->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s1->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s1"><span id="el_nilai_sumatif_s1">
<input type="<?= $Page->s1->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s1" name="x_s1" id="x_s1" size="10" maxlength="255" value="<?= $Page->s1->EditValue ?>"<?= $Page->s1->editAttributes() ?> aria-describedby="x_s1_help">
<?= $Page->s1->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s1->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s2->Visible) { // s2 ?>
    <div id="r_s2" class="form-group row">
        <label id="elh_nilai_sumatif_s2" for="x_s2" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s2"><?= $Page->s2->caption() ?><?= $Page->s2->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s2->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s2"><span id="el_nilai_sumatif_s2">
<input type="<?= $Page->s2->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s2" name="x_s2" id="x_s2" size="10" maxlength="255" value="<?= $Page->s2->EditValue ?>"<?= $Page->s2->editAttributes() ?> aria-describedby="x_s2_help">
<?= $Page->s2->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s2->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s3->Visible) { // s3 ?>
    <div id="r_s3" class="form-group row">
        <label id="elh_nilai_sumatif_s3" for="x_s3" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s3"><?= $Page->s3->caption() ?><?= $Page->s3->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s3->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s3"><span id="el_nilai_sumatif_s3">
<input type="<?= $Page->s3->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s3" name="x_s3" id="x_s3" size="10" maxlength="255" value="<?= $Page->s3->EditValue ?>"<?= $Page->s3->editAttributes() ?> aria-describedby="x_s3_help">
<?= $Page->s3->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s3->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s4->Visible) { // s4 ?>
    <div id="r_s4" class="form-group row">
        <label id="elh_nilai_sumatif_s4" for="x_s4" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s4"><?= $Page->s4->caption() ?><?= $Page->s4->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s4->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s4"><span id="el_nilai_sumatif_s4">
<input type="<?= $Page->s4->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s4" name="x_s4" id="x_s4" size="10" maxlength="255" value="<?= $Page->s4->EditValue ?>"<?= $Page->s4->editAttributes() ?> aria-describedby="x_s4_help">
<?= $Page->s4->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s4->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s5->Visible) { // s5 ?>
    <div id="r_s5" class="form-group row">
        <label id="elh_nilai_sumatif_s5" for="x_s5" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s5"><?= $Page->s5->caption() ?><?= $Page->s5->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s5->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s5"><span id="el_nilai_sumatif_s5">
<input type="<?= $Page->s5->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s5" name="x_s5" id="x_s5" size="10" maxlength="255" value="<?= $Page->s5->EditValue ?>"<?= $Page->s5->editAttributes() ?> aria-describedby="x_s5_help">
<?= $Page->s5->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s5->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s6->Visible) { // s6 ?>
    <div id="r_s6" class="form-group row">
        <label id="elh_nilai_sumatif_s6" for="x_s6" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s6"><?= $Page->s6->caption() ?><?= $Page->s6->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s6->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s6"><span id="el_nilai_sumatif_s6">
<input type="<?= $Page->s6->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s6" name="x_s6" id="x_s6" size="10" maxlength="255" value="<?= $Page->s6->EditValue ?>"<?= $Page->s6->editAttributes() ?> aria-describedby="x_s6_help">
<?= $Page->s6->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s6->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s7->Visible) { // s7 ?>
    <div id="r_s7" class="form-group row">
        <label id="elh_nilai_sumatif_s7" for="x_s7" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s7"><?= $Page->s7->caption() ?><?= $Page->s7->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s7->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s7"><span id="el_nilai_sumatif_s7">
<input type="<?= $Page->s7->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s7" name="x_s7" id="x_s7" size="10" maxlength="255" value="<?= $Page->s7->EditValue ?>"<?= $Page->s7->editAttributes() ?> aria-describedby="x_s7_help">
<?= $Page->s7->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s7->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->s8->Visible) { // s8 ?>
    <div id="r_s8" class="form-group row">
        <label id="elh_nilai_sumatif_s8" for="x_s8" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_s8"><?= $Page->s8->caption() ?><?= $Page->s8->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->s8->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_s8"><span id="el_nilai_sumatif_s8">
<input type="<?= $Page->s8->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_s8" name="x_s8" id="x_s8" size="10" maxlength="255" value="<?= $Page->s8->EditValue ?>"<?= $Page->s8->editAttributes() ?> aria-describedby="x_s8_help">
<?= $Page->s8->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->s8->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nas->Visible) { // nas ?>
    <div id="r_nas" class="form-group row">
        <label id="elh_nilai_sumatif_nas" for="x_nas" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nas"><?= $Page->nas->caption() ?><?= $Page->nas->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nas->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nas" class="nilai_sumatifedit">
<input readonly=readonly type="<?= $Page->nas->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_nas" name="x_nas" id="x_nas" size="10" maxlength="255" value="<?= $Page->nas->EditValue ?>"<?= $Page->nas->editAttributes() ?> aria-describedby="x_nas_help">
</template>
<template id="tpx_nilai_sumatif_nas"><span id="el_nilai_sumatif_nas">
<slot name="tpx_nilai_sumatif_nas"></slot>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->sts->Visible) { // sts ?>
    <div id="r_sts" class="form-group row">
        <label id="elh_nilai_sumatif_sts" for="x_sts" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_sts"><?= $Page->sts->caption() ?><?= $Page->sts->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->sts->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_sts"><span id="el_nilai_sumatif_sts">
<input type="<?= $Page->sts->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_sts" name="x_sts" id="x_sts" size="10" maxlength="255" value="<?= $Page->sts->EditValue ?>"<?= $Page->sts->editAttributes() ?> aria-describedby="x_sts_help">
<?= $Page->sts->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->sts->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->sas->Visible) { // sas ?>
    <div id="r_sas" class="form-group row">
        <label id="elh_nilai_sumatif_sas" for="x_sas" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_sas"><?= $Page->sas->caption() ?><?= $Page->sas->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->sas->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_sas"><span id="el_nilai_sumatif_sas">
<input type="<?= $Page->sas->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_sas" name="x_sas" id="x_sas" size="10" maxlength="255" value="<?= $Page->sas->EditValue ?>"<?= $Page->sas->editAttributes() ?> aria-describedby="x_sas_help">
<?= $Page->sas->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->sas->getErrorMessage() ?></div>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nr1->Visible) { // nr1 ?>
    <div id="r_nr1" class="form-group row">
        <label id="elh_nilai_sumatif_nr1" for="x_nr1" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nr1"><?= $Page->nr1->caption() ?><?= $Page->nr1->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nr1->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nr1" class="nilai_sumatifedit">
<input readonly=readonly type="<?= $Page->nr1->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_nr1" name="x_nr1" id="x_nr1" size="10" maxlength="255" value="<?= $Page->nr1->EditValue ?>"<?= $Page->nr1->editAttributes() ?> aria-describedby="x_nr1_help">
</template>
<template id="tpx_nilai_sumatif_nr1"><span id="el_nilai_sumatif_nr1">
<slot name="tpx_nilai_sumatif_nr1"></slot>
</span></template>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->nr2->Visible) { // nr2 ?>
    <div id="r_nr2" class="form-group row">
        <label id="elh_nilai_sumatif_nr2" for="x_nr2" class="<?= $Page->LeftColumnClass ?>"><template id="tpc_nilai_sumatif_nr2"><?= $Page->nr2->caption() ?><?= $Page->nr2->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></template></label>
        <div class="<?= $Page->RightColumnClass ?>"><div <?= $Page->nr2->cellAttributes() ?>>
<template id="tpx_nilai_sumatif_nr2" class="nilai_sumatifedit">
<input readonly=readonly type="<?= $Page->nr2->getInputTextType() ?>" data-table="nilai_sumatif" data-field="x_nr2" name="x_nr2" id="x_nr2" size="10" maxlength="255" value="<?= $Page->nr2->EditValue ?>"<?= $Page->nr2->editAttributes() ?> aria-describedby="x_nr2_help">
</template>
<template id="tpx_nilai_sumatif_nr2"><span id="el_nilai_sumatif_nr2">
<slot name="tpx_nilai_sumatif_nr2"></slot>
</span></template>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
<div id="tpd_nilai_sumatifedit" class="ew-custom-template"></div>
<template id="tpm_nilai_sumatifedit">
<div id="ct_NilaiSumatifEdit"><div class="row">
    <div class="col-lg-6">
        <div id="r_guru_id" class="form-group row">
            <label for="x_guru_id" class="col-sm-4 col-form-label"><?= $Page->guru_id->caption() ?></label>
            <div class="col-sm-8"><slot class="ew-slot" name="tpx_nilai_sumatif_guru_id"></slot></div>
        </div>
        <div id="r_kode_mapel" class="form-group row">
            <label for="x_kode_mapel" class="col-sm-4 col-form-label"><?= $Page->kode_mapel->caption() ?></label>
            <div class="col-sm-8"><slot class="ew-slot" name="tpx_nilai_sumatif_kode_mapel"></slot></div>
        </div>
        <div id="r_kelas" class="form-group row">
            <label for="x_kelas" class="col-sm-4 col-form-label"><?= $Page->kelas->caption() ?></label>
            <div class="col-sm-8"><slot class="ew-slot" name="tpx_nilai_sumatif_kelas"></slot></div>
        </div>
    </div>
    <div class="col-lg-6">
        <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_nilai_sumatif_nis"></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_nilai_sumatif_nisn"></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_nilai_sumatif_nama"></slot></div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-lg-4">
        <div id="r_s1" class="form-group row">
            <label for="x_s1" class="col-sm-2 col-form-label"><?= $Page->s1->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s1"></slot></div>
        </div>
        <div id="r_s2" class="form-group row">
            <label for="x_s2" class="col-sm-2 col-form-label"><?= $Page->s2->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s2"></slot></div>
        </div>
        <div id="r_s3" class="form-group row">
            <label for="x_s3" class="col-sm-2 col-form-label"><?= $Page->s3->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s3"></slot></div>
        </div>
        <div id="r_s4" class="form-group row">
            <label for="x_s4" class="col-sm-2 col-form-label"><?= $Page->s4->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s4"></slot></div>
        </div>
    </div>
    <div class="col-lg-4">
        <div id="r_s5" class="form-group row">
            <label for="x_s5" class="col-sm-2 col-form-label"><?= $Page->s5->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s5"></slot></div>
        </div>
        <div id="r_s6" class="form-group row">
            <label for="x_s6" class="col-sm-2 col-form-label"><?= $Page->s6->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s6"></slot></div>
        </div>
        <div id="r_s7" class="form-group row">
            <label for="x_s7" class="col-sm-2 col-form-label"><?= $Page->s7->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s7"></slot></div>
        </div>
        <div id="r_s8" class="form-group row">
            <label for="x_s8" class="col-sm-2 col-form-label"><?= $Page->s8->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_s8"></slot></div>
        </div>
    </div>
    <div class="col-lg-4">
        <div id="r_nas" class="form-group row">
            <label for="x_nas" class="col-sm-2 col-form-label"><?= $Page->nas->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_nas"></slot></div>
        </div>
        <div id="r_sts" class="form-group row">
            <label for="x_sts" class="col-sm-2 col-form-label"><?= $Page->sts->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_sts"></slot></div>
        </div>
        <div id="r_sas" class="form-group row">
            <label for="x_sas" class="col-sm-2 col-form-label"><?= $Page->sas->caption() ?></label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_sas"></slot></div>
        </div>
        <div id="r_nr2" class="form-group row">
            <label for="x_nr2" class="col-sm-2 col-form-label">NR</label>
            <div class="col-sm-10"><slot class="ew-slot" name="tpx_nilai_sumatif_nr1"></slot> <slot class="ew-slot" name="tpx_nilai_sumatif_nr2"></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_nilai_sumatifedit", "tpm_nilai_sumatifedit", "nilai_sumatifedit", "<?= $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("nilai_sumatif");
});
</script>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
