<script type="text/javascript">

$('#id_karyawan').select2({
    placeholder: '<?= $this->lang->line('pilih_karyawan') ?>',
    allowClear: true,
    ajax: {
      // type: 'POST',
        url: '<?= route("dropdown.karyawan") ?>',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
        return {
                results: data
            };
        },
        cache: false
    },
    minLength: 3
});
</script>
<div class="card-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    <h3 class="title modal-title"></h3>
</div>
<div id="form_input" class="card-body" disabled>
    <input type="hidden" id="id_notification" class="form-control" value="<?= ((isset($data))?md5($data->id_notification):'') ?>">
    <div class="form-group">
        <label><?= $this->lang->line('karyawan'); ?> <i class="text-danger">*</i></label>
         <select class="form-control" name="id_karyawan" id="id_karyawan" class="select2 form-control" style="border-radius: 5px; width: 100%;">
            <option value="<?=$data->id_karyawan?>" selected><?= $data->nik.' - '.$data->nama_lengkap?></option>
        </select>
    </div>
        
     <div class="row">
        <div class="col-md-12">
            <label><?= $this->lang->line('hak_akses'); ?> <i class="text-danger">*</i></label>
            <div class="row">
                <div class="col-md-6">
                    <input type="radio" id="hrd" name="hak_akses" value="1" checked="true" <?php if($data->notif_hrd=="1"){ echo "checked";}?>>
                    <label for="hrd">Notif Admin</label>
                </div>
                <div>
                    <input type="radio" id="finance" name="hak_akses" value="2" <?php if($data->notif_finance=="1"){ echo "checked";}?>>
                    <label for="finance">Notif Finance</label>
                </div>
            </div>
        </div> 
    </div> 
</div>
<div class="card-footer">
    <div class="row">
        <div class="col-md-7 text-left">
            <div id="message"></div>
        </div>
        <div class="col-md-5 text-right">
            <button id="btn_new_input" class="btn" style="display:none"><?= $this->lang->line('button_form_tambah_baru'); ?></button>
            <button class="btn_save ladda-button" data-style="expand-left"></button>
        </div>
    </div><!-- ./row -->
</div>
