<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/jaminan/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>Nama Jaminan</label>
                    <input type="text" class="form-control" id="nm_agungan" name="nm_agungan"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Foto Satu</label>
                    <input type="text" class="form-control" id="foto_1" name="foto_1"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Foto Dua</label>
                    <input type="text" class="form-control" id="foto_2" name="foto_2"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Foto Tiga</label>
                    <input type="text" class="form-control" id="foto_3" name="foto_3"
                        placeholder="Masukkan Total Pembayaran" required>
                </div>
                <div class="form-group">
                    <label>Foto Empat</label>
                    <input type="text" class="form-control" id="foto_4" name="foto_4"
                        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>
            </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 nm_agungan = $(this).data('nm_agungan');
    var foto_1 = $(this).data('foto_1');
    var foto_2 = $(this).data('foto_2');
    var foto_3 = $(this).data('foto_3');
    var foto_4 = $(this).data('foto_4');
    $(".modal-body#detail_body_nota #kontrak_id").val(kontrak_id);
    $(".modal-body#detail_body_nota #nm_agungan").val(nm_agungan);
    $(".modal-body#detail_body_nota #foto_1").val(foto_1);
    $(".modal-body#detail_body_nota #foto_2").val(foto_2);
    $(".modal-body#detail_body_nota #foto_3").val(foto_3);
    $(".modal-body#detail_body_nota #foto_4").val(foto_4);
})
</script>