<div class="modal fade" id="tambahGajiKaryawan" tabindex="-1" role="dialog" aria-labelledby="tambahGajiKaryawanTitle"
    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="tambahGajiKaryawanTitle">
                    Gaji 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('keuangan/identitas/crud_gaji'); ?>
                <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>"
                    value="<?= $this->security->get_csrf_hash(); ?>" style="display: none">
                <div class="form-group">
                    <label>Total Kerja</label>
                    <input type="text" class="form-control" id="total_kerja" name="total_kerja"
                        placeholder="Pekerjaan Anggota Arisan" required>
                    <input type="text" class="form-control" value="<?= $login['id'] ?>" hidden id="login_id"
                        name="login_id" placeholder="Pekerjaan Anggota Arisan" required>
                    <input type="text" class="form-control" value="<?= $identitas['sb'] ?>" hidden id="gaji_lama"
                        name="gaji_lama" placeholder="Masukkan Total Kerja Dalam Hitungan Menit" required>
                    <small>*Total kerja adalah lama bekerja sebulan dalam hitungan menit</small>
                </div>
                <div class="form-group">
                    <label for="">Status Gaji Pokok</label>
                    <select class="form-control" id="gaji_pokok" onchange="gajiPokok(this)" name="gaji_pokok" required>
                        <option value="1">Gaji Pokok Lama</option>
                        <option value="2">Gaji Pokok Baru</option>
                    </select>
                </div>
                <div class="form-group" id="select_gaji_pokok" style="display:none">
                    <label>Gaji Pokok Baru</label>
                    <input type="text" class="form-control" id="gaji_pokok_baru" name="gaji_pokok_baru"
                        placeholder="Masukkan Gaji Pokok Baru Karyawan">
                </div>
                <div class="form-group">
                    <label for="">Metode Pembayaran</label>
                    <select class="form-control" id="metode_bayar" name="metode_bayar" required>
                        <option value="1">Transfer</option>
                        <option value="2">Tunai</option>
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
                    Close
                </button>
                <button type="submit" id="tambahGajiBaru" name="tambahGajiBaru" class="btn btn-primary">Tambah</button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>
<script>
function gajiPokok(select) {
    if (select.value == 1) {
        $("#select_gaji_pokok").hide();
    }
    if (select.value == 2) {
        $("#select_gaji_pokok").show();
    }
}
</script>