<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 Nota
                </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_nota">
                <?php echo form_open_multipart('owner/database/koperasi/progress/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>Kontrak ID</label>
                    <input type="number" class="form-control" id="kontrak_id" name="kontrak_id"
                        placeholder="Masukkan Nama Desa" required readonly>
                </div>
                <div class="form-group">
                    <label>Tanggal Pengajuan</label>
                    <input type="date" class="form-control" id="tgl_pengajuan" name="tgl_pengajuan"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Tanggal Konfirmasi</label>
                    <input type="date" class="form-control" id="tgl_konfirmasi" name="tgl_konfirmasi"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Tanggal Realisasi</label>
                    <input type="date" class="form-control" id="tgl_realisasi" name="tgl_realisasi"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="deleteDatabaseTerbaru" name="deleteDatabaseTerbaru"
                    class="btn btn-danger">Hapus</button>
                <button type="submit" id="updateDatabaseTerbaru" name="updateDatabaseTerbaru"
                    class="btn btn-warning">Update</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 kontrak_id = $(this).data('kontrak_id');
    var tgl_pengajuan = $(this).data('tgl_pengajuan');
    var tgl_konfirmasi = $(this).data('tgl_konfirmasi');
    var tgl_realisasi = $(this).data('tgl_realisasi');
    $(".modal-body#detail_body_nota #kontrak_id").val(kontrak_id);
    $(".modal-body#detail_body_nota #tgl_pengajuan").val(tgl_pengajuan);
    $(".modal-body#detail_body_nota #tgl_konfirmasi").val(tgl_konfirmasi);
    $(".modal-body#detail_body_nota #tgl_realisasi").val(tgl_realisasi);
})
</script>