<div class="row layout-spacing">
    <div class="col-lg-12">
        <div class="statbox widget box box-shadow">
            <div class="widget-content widget-content-area">
                <p class="mb-4">
                    <center>
                        <img src="<?= base_url() ?>assets/ptgs_id/<?= $identitas['foto_ktp'] ?>" style="height: 160px;">
                    </center>
                </p>
                <div class="modal-body">
                    <?php echo form_open_multipart('keuangan/sistem/karyawan/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</label>
                        <input type="number" class="form-control" value="<?= $identitas['nik'] ?>" id="nik" name="nik"
                            placeholder="Nomor Induk Kependudukan">
                        <?php if ($identitas['nik'] > 0) : ?>
                        <input type="number" class="form-control" hidden value="<?= $identitas['nik'] ?>" id="nik_lama"
                            name="nik_lama" placeholder="Nomor Induk Kependudukan">
                        <?php endif; ?>
                    </div>
                    <div class="form-group">
                        <label>Nama Karyawan</label>
                        <input type="text" class="form-control" value="<?= $login['nm_panggilan'] ?>" id="nm_panggilan"
                            name="nm_panggilan" placeholder="Nama Anggota Kelompok Arisan">
                        <input type="number" class="form-control" value="<?= $login['id'] ?>" id="login_id"
                            name="login_id" hidden>
                    </div>
                    <div class="form-group">
                        <label>Jenis Kelamin</label>
                        <select class="form-control" id="jk" name="jk">
                            <option value="<?= $identitas['jk'] ?>">
                                <?php if ($identitas['jk'] == 1) :
                                    echo 'LAKI-LAKI';
                                elseif ($identitas['jk'] == 2) :
                                    echo 'PEREMPUAN';
                                else :
                                    echo 'Pilih Jenis Kelamin';
                                endif;
                                ?>
                            </option>
                            <option value="1">LAKI-LAKI</option>
                            <option value="2">PEREMPUAN</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="">Provinsi</label>
                        <input type="text" readonly class="form-control" value="<?= $alamat['prov'] ?>" id="prov"
                            name="prov" placeholder="Provinsi">
                    </div>
                    <div class="form-row mb-4">
                        <div class="col-4">
                            <label for="">Kabupaten / Kota</label>
                            <select class="form-control" id="kota_kabupaten" name="kota_kabupaten">
                                <option value="<?= $alamat['kot_kab'] ?>"><?= $alamat['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-4">
                            <label for="">Kecamatan</label>
                            <select class="form-control" id="kecamatan_baru" name="kecamatan_baru">
                                <option value="<?= $alamat['nm_kecamatan'] ?>">
                                    <?= $alamat['nm_kecamatan'] ?></option>
                            </select>
                        </div>
                        <div class="col-4">
                            <label for="">Desa / Kelurahan</label>
                            <select class="form-control" id="dk_ds" name="dk_ds">
                                <option value="<?= $alamat['nm_desa'] ?>"><?= $alamat['nm_desa'] ?></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="<?= $identitas['tempat_lahir'] ?>"
                                    id="tempat_lahir" name="tempat_lahir" placeholder="Tempat Lahir">
                            </div>
                            <div class="col">
                                <input type="date" value="<?= $identitas['tgl_lahir'] ?>"
                                    max='<?= date("Y-m-d", strtotime("-18 year")); ?>' class="form-control"
                                    id="tgl_lahir" name="tgl_lahir" placeholder="Tanggal Lahir">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Nomor HP</label>
                        <input type="number" class="form-control" value="<?= $login['no_hp'] ?>" id="no_hp" name="no_hp"
                            placeholder="Nomor HP">
                        <input type="number" class="form-control" hidden value="<?= $login['no_hp'] ?>" id="no_hp_lama"
                            name="no_hp_lama" placeholder="Nomor HP">
                    </div>
                    <div class="form-group">
                        <label>Email</label>
                        <input type="email" class="form-control" value="<?= $login['email'] ?>" id="email_baru"
                            name="email_baru" placeholder="Email Karyawan">
                        <input type="email" class="form-control" hidden value="<?= $login['email'] ?>" id="email_lama"
                            name="email_lama" placeholder="Email Karyawan">
                    </div>
                    <div class="form-group">
                        <label>Role Level</label>
                        <input type="text" readonly class="form-control" value="<?= $role_level['role_level'] ?>"
                            id="pekerjaan" name="pekerjaan" placeholder="Role Level Sistem">
                    </div>
                    <div class="form-group">
                        <label>Foto KTP</label>
                        <input type="file" class="form-control" value="<?= set_value("foto_ktp") ?>" id="foto_ktp"
                            name="foto_ktp" placeholder="Foto KTP">
                        <input type="text" class="form-control" hidden value="<?= $identitas['foto_ktp'] ?>"
                            id="foto_ktp_old" name="foto_ktp_old" placeholder="Nama Suami atau Istri">
                    </div>
                    <div class="form-group">
                        <label>Tanggal Gabung</label>
                        <input type="date" class="form-control" value="<?= $identitas['tgl_gabung'] ?>" id="tgl_gabung"
                            name="tgl_gabung" placeholder="Tanggal Gabung">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" id="updateDataDiriSendiri" name="updateDataDiriSendiri"
                        class="btn btn-primary">Simpan</button>
                </div>
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('keuangan/identitas/profile/script'); ?>