<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 Sistem API EMAIL
                </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_email">
                <?php echo form_open_multipart('owner/database/sistem/email/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>Host Mail</label>
                    <input type="text" class="form-control" id="host_mail" name="host_mail"
                        placeholder="Masukkan Host Mail" required>
                    <input type="text" class="form-control" hidden id="email_id" name="email_id"
                        placeholder="Masukkan Nama Desa" required>
                </div>
                <div class="form-group">
                    <label>User Mail</label>
                    <input type="text" class="form-control" id="user_mail" name="user_mail"
                        placeholder="Masukkan User Mail" required>
                </div>
                <div class="form-group">
                    <label>Password Mail</label>
                    <input type="text" class="form-control" id="pass_mail" name="pass_mail"
                        placeholder="Masukkan Password Mail" required>
                </div>
                <div class="form-group">
                    <label>Setting Mail</label>
                    <input type="text" class="form-control" id="set_mail" name="set_mail"
                        placeholder="Masukkan Setting Mail" required>
                </div>
                <div class="form-group">
                    <label>Keterangan Mail</label>
                    <textarea type="text" cols="30" rows="5" class="form-control" id="ket_mail" name="ket_mail"
                        placeholder="Keterangan Mail Digunakan Untuk Apa" required></textarea>
                </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 email_id = $(this).data('email_id');
    var host_mail = $(this).data('host_mail');
    var user_mail = $(this).data('user_mail');
    var pass_mail = $(this).data('pass_mail');
    var set_mail = $(this).data('set_mail');
    var ket_mail = $(this).data('ket_mail');
    $(".modal-body#detail_body_email #email_id").val(email_id);
    $(".modal-body#detail_body_email #host_mail").val(host_mail);
    $(".modal-body#detail_body_email #user_mail").val(user_mail);
    $(".modal-body#detail_body_email #pass_mail").val(pass_mail);
    $(".modal-body#detail_body_email #set_mail").val(set_mail);
    $(".modal-body#detail_body_email #ket_mail").val(ket_mail);
})
</script>