<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 Data Karyawan
                </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('manager/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 ( NIK )</label>
                    <input type="number" class="form-control" id="nik" name="nik" placeholder="Nomor Induk Kependudukan ( NIK )" required>
                </div>
                <div class="form-group">
                    <label>Email Kerja</label>
                    <input type="email" class="form-control" id="email" name="email" placeholder="Email Kerja" required>
                </div>
                <div class="form-group">
                    <label>Nama Panggilan</label>
                    <input type="text" class="form-control" id="nm_panggilan" name="nm_panggilan" placeholder="Nama Karyawan" required>
                </div>
                <div class="form-group">
                    <label>Jenis Kelamin</label>
                    <select class="form-control" id="jk" name="jk" required>
                        <option value="1">Pria</option>
                        <option value="2">Wanita</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="">Pilih Kabupaten / Kota</label>
                    <select class="form-control" id="kota_kabupaten" name="kota_kabupaten" required>
                        <option value="PILIH">Pilih Kabupaten / Kota</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="form-row mb-4">
                    <div class="col-6">
                        <label for="">Pilih Kecamatan</label>
                        <select class="form-control" id="kecamatan_baru" name="kecamatan_baru" required>
                        </select>
                    </div>
                    <div class="col-6">
                        <label for="">Pilih Desa</label>
                        <select class="form-control" id="dk_ds" name="dk_ds" required>
                        </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" 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>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>Jabatan</label>
                    <select class="form-control" id="role_id" name="role_id" required>
                        <?php foreach ($role_level as $Role_level) : ?>
                            <option value="<?= $Role_level->id ?>"><?= $Role_level->role_level ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <div class="form-group">
                    <label>Tanggal Gabung</label>
                    <input type="date" class="form-control" id="tgl_gabung" name="tgl_gabung" placeholder="Tanggal Gabung Karyawan" required>
                </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="simpanAnggotaKaryawan" name="simpanAnggotaKaryawan" class="btn btn-primary">Simpan</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<?php $this->load->view('manager/sistem/karyawan/script'); ?>