<div class="modal fade" id="tambahKaryawan" tabindex="-1" role="dialog" aria-labelledby="tambahKaryawanTitle"
    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="tambahKaryawanTitle">
                    Tambah Karyawan Koperasi
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <?php echo form_open_multipart('owner/anggota/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 ( NIK )</label>
                    <input type="number" class="form-control" id="nik_anggota" name="nik_anggota"
                        placeholder="Nomor Induk Kependudukan ( NIK )" required>
                </div>
                <div class="form-group">
                    <label>Email Pengurus</label>
                    <input type="email" class="form-control" id="email" name="email"
                        placeholder="Masukkan Email Pengurus" required>
                </div>
                <div class="form-group">
                    <label>Nomor HP</label>
                    <input type="number" class="form-control" id="no_hp" name="no_hp" placeholder="Nomor HP" required>
                </div>
                <div class="form-group">
                    <label>Nama Panggilan</label>
                    <input type="text" class="form-control" 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="ok">Jenis Kelamin</option>
                        <option value="1">LAKI-LAKI</option>
                        <option value="2">PEREMPUAN</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>Alamat Rumah</label>
                    <select class="form-control" id="province_id" name="province_id" required>
                        <option value="pilih">Pilih Provinsi</option>
                        <?php foreach ($provinsi as $Provinsi) : ?>
                            <option value="<?= $Provinsi['id'] ?>"><?= $Provinsi['name'] ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <div class="form-row mb-4">
                    <div class="col-4">
                        <select class="form-control" id="kot_kab" name="kot_kab" required>
                            <option value="pilih">Kabupaten/Kota</option>
                        </select>
                    </div>
                    <div class="col-4">
                        <select class="form-control" id="nm_kec" name="nm_kec" required>
                            <option value="pilih">Kecamatan</option>
                        </select>
                    </div>
                    <div class="col-4">
                        <select class="form-control" id="nm_desa" name="nm_desa" required>
                            <option value="pilih">Desa / Kelurahan</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label>Kode Pos</label>
                    <input type="number" class="form-control" id="kd_pos" name="kd_pos" placeholder="Masukkan Kode Pos"
                        required>
                </div>
                <div class="form-group">
                    <label>User Lavel</label>
                    <select class="form-control" id="role_id" name="role_id" required>
                        <?php foreach ($data_level as $Level) : ?>
                            <option value="<?= $Level->id ?>"><?= $Level->role_level ?></option>
                        <?php endforeach; ?>
                    </select>
                </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" id="tempat_lahir" name="tempat_lahir"
                                placeholder="Tempat Lahir" required>
                        </div>
                        <div class="col">
                            <input type="date" 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>Foto KTP</label>
                    <input type="file" class="form-control" id="foto_ktp" name="foto_ktp" placeholder="Foto KTP"
                        required>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="simpanAnggoKoperasi" name="simpanAnggoKoperasi"
                    class="btn btn-primary">Tambah</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<?php $this->load->view('owner/anggota/karyawan/script'); ?>