<div class="tab-pane fade show active" id="tabs_identitas" role="tabpanel" aria-labelledby="identitas_tabs">
    <p class="mb-4">
        <center>
            <img src="<?= base_url() ?>assets/foto_ktp/<?= $data_anggota['foto_ktp'] ?>" style="height: 160px;">
            <img src="<?= base_url() ?>assets/foto_ktp/<?= $data_anggota['foto_kk'] ?>" style="height: 160px;">
        </center>
    </p>
    <div class="modal-body">
        <?php echo form_open_multipart('keuangan/sistem/anggota_koperasi/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 Induk Kependudukan ( NIK )</label>
            <input type="number" class="form-control" readonly value="<?= $data_anggota['nik'] ?>" id="nik" name="nik"
                placeholder="Nomor Induk Kependudukan ( NIK )" required>
            <input type="number" class="form-control" value="<?= $anggota_id ?>" id="id_anggota" name="id_anggota"
                hidden required>
        </div>
        <div class="form-group">
            <label>Nama Panggilan</label>
            <input type="text" class="form-control" value="<?= $data_anggota['nm_anggota'] ?>" id="nm_anggota"
                name="nm_anggota" placeholder="Nama Anggota Kelompok Arisan" required>
        </div>
        <div class="form-group">
            <label>Jenis Kelamin</label>
            <select class="form-control" id="jk" name="jk" required>
                <option value="<?= $data_anggota['jk'] ?>">
                    <?php if ($data_anggota['jk'] == 1) :
                        echo 'LAKI-LAKI';
                    else :
                        echo 'PEREMPUAN';
                    endif;
                    ?>
                </option>
                <option value="1">LAKI-LAKI</option>
                <option value="2">PEREMPUAN</option>
            </select>
        </div>
        <div class="form-group">
            <label>Alamat Lengkap</label>
            <textarea class="form-control" name="alamat_lengkap" id="alamat_lengkap" cols="30" rows="2"
                placeholder="Mis. Jalan, Sekolah, Perumahan, Dst"
                required><?= $data_anggota['alamat_lengkap'] ?></textarea>
        </div>
        <div class="form-group">
            <label for="">Provinsi</label>
            <input type="text" readonly class="form-control" value="<?= $data_anggota['prov'] ?>" id="prov" name="prov"
                placeholder="Provinsi" required>
        </div>
        <div class="form-row mb-4">
            <div class="col-6">
                <label for="">Kabupaten / Kota</label>
                <select class="form-control" id="kota_kabupaten" name="kota_kabupaten" required>
                    <option value="<?= $data_anggota['kot_kab'] ?>"><?= $data_anggota['kot_kab'] ?></option>
                    <?php foreach ($data_kota as $Data_kota) : ?>
                        <option value="<?= $Data_kota->kot_kab ?>"><?= $Data_kota->kot_kab ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
            <div class="col-6">
                <label for="">Kecamatan</label>
                <select class="form-control" id="kecamatan_baru" name="kecamatan_baru" required>
                    <option value="<?= $data_anggota['nm_kecamatan'] ?>"><?= $data_anggota['nm_kecamatan'] ?></option>
                </select>
            </div>
        </div>
        <div class="form-row mb-4">
            <div class="col-6">
                <label for="">Desa / Kelurahan</label>
                <select class="form-control" id="dk_ds" name="dk_ds" required>
                    <option value="<?= $data_anggota['nm_desa'] ?>"><?= $data_anggota['nm_desa'] ?></option>
                </select>
            </div>
            <div class="col">
                <label for="">RT</label>
                <select class="form-control" id="nm_rt" name="nm_rt" required>
                    <option value="<?= $data_anggota['nm_rt'] ?>">
                        <?= $data_anggota['nm_rt'] ?></option>
                    <option value="001">001</option>
                    <option value="002">002</option>
                    <option value="003">003</option>
                    <option value="004">004</option>
                    <option value="005">005</option>
                    <option value="006">006</option>
                    <option value="007">007</option>
                    <option value="008">008</option>
                    <option value="009">009</option>
                    <option value="010">010</option>
                    <option value="011">011</option>
                    <option value="012">012</option>
                    <option value="013">013</option>
                    <option value="014">014</option>
                    <option value="015">015</option>
                    <option value="016">016</option>
                    <option value="017">017</option>
                    <option value="018">018</option>
                    <option value="019">019</option>
                    <option value="020">020</option>
                </select>
            </div>
            <div class="col">
                <label for="">RW</label>
                <select class="form-control" id="nm_rw" name="nm_rw" required>
                    <option value="<?= $data_anggota['nm_rw'] ?>">
                        <?= $data_anggota['nm_rw'] ?></option>
                    <option value="001">001</option>
                    <option value="002">002</option>
                    <option value="003">003</option>
                    <option value="004">004</option>
                    <option value="005">005</option>
                    <option value="006">006</option>
                    <option value="007">007</option>
                    <option value="008">008</option>
                    <option value="009">009</option>
                    <option value="010">010</option>
                    <option value="011">011</option>
                    <option value="012">012</option>
                    <option value="013">013</option>
                    <option value="014">014</option>
                    <option value="015">015</option>
                    <option value="016">016</option>
                    <option value="017">017</option>
                    <option value="018">018</option>
                    <option value="019">019</option>
                    <option value="020">020</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label>Tempat Tanggal Lahir</label>
            <div class="form-row mb-4">
                <div class="col">
                    <input type="text" class="form-control" value="<?= $data_anggota['tempat_lahir'] ?>"
                        id="tempat_lahir" name="tempat_lahir" placeholder="Tempat Lahir" required>
                </div>
                <div class="col">
                    <input type="date" value="<?= $data_anggota['tgl_lahir'] ?>"
                        max='<?= date("Y-m-d", strtotime("-18 year")); ?>' class="form-control" id="tgl_lahir"
                        name="tgl_lahir" placeholder="Tanggal Lahir" required>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label>Nomor HP</label>
            <input type="number" class="form-control" value="<?= $data_anggota['no_hp'] ?>" id="no_hp" name="no_hp"
                placeholder="Nomor HP" required>
            <input type="number" class="form-control" value="<?= $data_anggota['no_hp'] ?>" hidden id="no_hp_lama"
                name="no_hp_lama" placeholder="Nomor HP" required>
        </div>
        <div class="form-group">
            <label>Pekerjaan</label>
            <input type="text" class="form-control" value="<?= $data_anggota['pekerjaan'] ?>" id="pekerjaan"
                name="pekerjaan" placeholder="Potongan Admin Setiap Bulan" required>
        </div>
        <div class="form-group">
            <label>Suami / Istri</label>
            <input type="text" class="form-control" value="<?= $data_anggota['suami_istri'] ?>" id="suami_istri"
                name="suami_istri" placeholder="Nama Suami atau Istri" required>
            <small>*Jika belum menikah isi Belum Menikah, Duda, Janda</small>
        </div>
    </div>
    <?php echo form_close(); ?>
</div>
<?php $this->load->view('kasir/identitas/anggota/script'); ?>