<div class="modal fade" id="konten_detail" tabindex="-1" role="dialog" aria-labelledby="konten_detailTitle"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="konten_detailTitle">
                    Detail Siste Role
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body" id="detail_body_rolelevel">
                <?php echo form_open_multipart('owner/database/sistem/role_level/crud'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Role Level</label>
                    <input type="text" class="form-control" id="role_level" name="role_level"
                        placeholder="Masukkan Nama Role Level" required>
                    <input type="text" class="form-control" hidden id="role_id" name="role_id"
                        placeholder="Masukkan Role ID Karyawan" required>
                </div>
                <div class="form-group">
                    <label>Keterangan Role Level</label>
                    <textarea type="text" cols="30" rows="5" class="form-control" id="ket_role" name="ket_role"
                        placeholder="Keterangan Role Level" required></textarea>
                </div>
                <div class="form-group">
                    <label>Status Role Level Login</label>
                    <select class="form-control" id="status_role" name="status_role" required>
                        <option value="AKTIF">AKTIF</option>
                        <option value="PASIF">PASIF</option>
                        <option value="HAPUS">HAPUS</option>
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="updateDatabaseTerbaru" name="updateDatabaseTerbaru"
                    class="btn btn-warning">Simpan</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).on("click", "#detail_konten", function() {
    var role_level = $(this).data('role_level');
    var role_id = $(this).data('role_id');
    var ket_role = $(this).data('ket_role');
    var status_role = $(this).data('status_role');
    $(".modal-body#detail_body_rolelevel #role_level").val(role_level);
    $(".modal-body#detail_body_rolelevel #role_id").val(role_id);
    $(".modal-body#detail_body_rolelevel #ket_role").val(ket_role);
    $(".modal-body#detail_body_rolelevel #status_role").val(status_role);
})
</script>