<div class="modal fade" id="jaminan_detail" tabindex="-1" role="dialog" aria-labelledby="jaminan_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="jaminan_detailTitle">
                    Tambah Foto Jaminan Pinjaman
                </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_jaminan">
                <?php echo form_open_multipart('kabag_marketing/kegiatan/pengajuan_pinjaman/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>Nomor Kontrak Pinjaman</label>
                    <input type="number" class="form-control" id="kontrak_id" readonly name="kontrak_id" placeholder="Nomor Induk Kependudukan ( NIK )" required>
                    <input type="number" class="form-control" id="aturan_id" hidden name="aturan_id" placeholder="Nomor Induk Kependudukan ( NIK )" required>
                </div>
                <div class="form-group">
                    <label>Gambar 1</label>
                    <input type="file" class="form-control" id="gambar_1" name="gambar_1" placeholder="Gambar 1">
                </div>
                <div class="form-group">
                    <label>Gambar 2</label>
                    <input type="file" class="form-control" id="gambar_2" name="gambar_2" placeholder="Gambar 2">
                </div>
                <div class="form-group">
                    <label>Gambar 3</label>
                    <input type="file" class="form-control" id="gambar_3" name="gambar_3" placeholder="Gambar 3">
                </div>
                <div class="form-group">
                    <label>Gambar 4</label>
                    <input type="file" class="form-control" id="gambar_4" name="gambar_4" placeholder="Gambar 4">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="tambahFotoJaminan" name="tambahFotoJaminan" class="btn btn-primary">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_jaminan", function() {
        var kontrak_id = $(this).data('kontrak_id');
        var aturan_id = $(this).data('aturan_id');
        $(".modal-body#detail_body_jaminan #kontrak_id").val(kontrak_id);
        $(".modal-body#detail_body_jaminan #aturan_id").val(aturan_id);
    })
</script>