<style>
    .error {
        color: red;
        font-size: .7em;
    }
</style>
<!-- Begin Page Content -->
<div class="container-fluid page-custum">
    <!-- Page Heading -->
    <h1 class="h3 mb-4 text-gray-800"><?= $title ?></h1>
    <div class="row">
        <div class="col-4 col-md-8">
            <?= $this->session->flashdata('message') ?>
        </div>
    </div>
    <div class="row">
        <input type="hidden" class="url" value="<?= base_url() ?>">
        <div class="col-12">
            <div class="card p-2">
                <div class="card-body">
                    <a href="<?= base_url('assets/fileupload/FormatNilai.xlsx'); ?>" class="btn btn-success"><i class="fas fa-file-excel"></i> Download Format Nilai</a>
                    <button class="btn btn-primary" data-toggle="modal" data-target="#modalUploadNilai"><i class="fas fa-upload"></i> Upload Data Nilai</button>
                    <table class="table table-sm tabel-upload-nilai" id="tabelUploadNilai">
                        <thead>
                            <tr>
                                <th>No</th>
                                <th>NISN</th>
                                <th>Nama</th>
                                <th>Total Nilai</th>
                                <!-- <th>Action</th> -->
                            </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
    <!-- /.container-fluid -->

    <!-- kumpulan modal upload nilai -->

    <!-- Modal form upload nilai -->
    <div class="modal fade" id="modalUploadNilai" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="modalUploadNilaiLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalUploadNilaiLabel">Form Upload Nilai</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                    <form action="<?= base_url('Operator/uploadNilai') ?>" method="POST" enctype="multipart/form-data" id="formUploadNilai">
                        <div class="custom-file">
                            <input type="file" class="custom-file-input" name="nilai" id="customFile">
                            <label class="custom-file-label" for="customFile">Cari file Nilai</label>
                        </div>


                        <button type="submit" name="import" id="UploadNilai" class="btn btn-success mt-4"><i class="fas fa-upload"></i> Upload Nilai</button>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
                </div>
                </form>
            </div>
        </div>
    </div>


</div>
<!-- End of Main Content -->
<!-- modal view Pendafatar -->