
<div class="row" id="portlet-content">
    <div class="col-md-12">
        <div class="portlet light" style="position:relative">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-laptop"></i>Tambah Penyesuaian BHP  
                </div>
            </div>



            <div class="portlet-body" id="page-content" style="display:nonee">
              
              <div class="portlet-body form" id="page-content" style="display:noEne">
                  <form action="<?=site_url()?>/front_office/ugd_dir/ugd/save_penyesuaian_tambah" method="post" id="<?=$controller?>" enctype="multipart/form-data" class="horizontal-form">
                    <div class="form-body">
                      <div class="alert alert-danger display-hide" style="display:none;" id="error">
                        <button class="close" data-close="alert"></button>
                        <span id="error-text"></span>
                      </div>                                 

                      <div class="row">     
                       <div class="col-md-4">
                          <div class="form-group" id="form_id_re_pasien">
                            <label for="id_re_pasien" class="control-label">Tanggal</label>
                            <input type="date" class="form-control" name="tgl" value="<?=date('Y-m-d')?>" placeholder="Qty">
                           
                            <span id="error_id_re_pasien" class="help-block"></span>
                          </div>
                        </div> 

                        <div class="col-md-4">
                          <div class="form-group" id="form_id_re_pasien">
                            <label for="id_re_pasien" class="control-label">BHP *</label>
                            <select id="id_bhp" name="id_bhp" class="form-control" style="width:100%" required>
                                <option value=""></option>
                                <?php 
                                $q = $this->M_general->get_bhp_stok_lab();
                                foreach ($q->result() as $key ) { ?>
                                  <option value="<?=$key->id_bhp?>"><?=$key->nama_item?></option>
                                <?php }?>
                            </select>
                           
                            <span id="error_id_re_pasien" class="help-block"></span>
                          </div>
                        </div> 

                       

                        <div class="col-md-4">
                          <div class="form-group" id="form_id_re_pasien">
                            <label for="id_re_pasien" class="control-label">Jumlah </label>
                            <input type="number" class="form-control" name="qty" value="" placeholder="Qty">
                           
                            <span id="error_id_re_pasien" class="help-block"></span>
                          </div>
                        </div> 

                        <div class="col-md-12">
                          <div class="form-group" id="form_id_re_pasien">
                            <label for="id_re_pasien" class="control-label">Keterangan</label>
                            <textarea class="form-control" name="keterangan" style="height: 80px" required></textarea>
                            <span id="error_id_re_pasien" class="help-block"></span>
                          </div>
                        </div> 




                      </div> 
                    </div>
                    <div class="form-actions left">
                      <button type="submit" class="btn blue"><i class="fa fa-check"></i> Simpan</button>
                    </div>

                  </form>

               
            </div>
           
        </div>
    </div>
</div>





<script>
  $(document).ready( function () {



    var table=$('#<?=$controller?>_table').DataTable({
      "order": [[ 0, 'desc' ]],
      "processing": false,
      "serverSide": false,
      "searching": true,
      "language": {
            "url": "<?=base_url('media/assets/global/plugins/datatables/media/js')?>/indonesian.json"
       },
      "columnDefs": [
        {"targets": [0],"bSortable": false}
      ],
    
      "fnInitComplete": function(oSettings, json) {
        $('.dataTables_processing').css('display','none');
        $( "#loading-content" ).fadeOut( "fast", function() {
          $( "#tombol-action" ).fadeIn("fast");
          $( "#page-content" ).fadeIn("fast");
        });
      }
    });

  });

  $('.hapusdata').click(function(){
    if(confirm("Apakah kamu yakin menghapus entry ini?")){
      return true;
    }
    else{
      return false;
    }
  });
</script>


<script>
  $("#id_bhp").select2({
      placeholder: "Pilih BHP (Harus diisi)",
      language: "id"
  });

  $("#id_re_kunjungan").select2({
      placeholder: "Pilih Kunjungan Pasien",
      language: "id"
  });

  $(document).ready(function () {
    $('.datepickers').datepicker({
      format: 'dd-mm-yyyy' 
    });
  });
</script>
