 <div>
    <h4 class="form-section" style="margin:30px 0px 10px 0px !important; padding-bottom:0px !important">
        <i class="fa fa-align-justify"></i> <strong> Tindakan Perawatan Pasien<hr style="margin:10px 0px !important" > </strong>
    </h4>

    <div class="row" >
      <div class="col-md-12">
        


         <div class="row">
            <div class="col-md-12">
              <div class="form-group" id="icd">
                <div class="table-responsive">
                 
                  <table id="<?= $controller ?>_table" class="table table-bordered table-striped table-hover" style="margin-bottom:0px; width:100%; font-size:11px !important">
                      
                      <tbody>
                        <?php 
                        $i=1;

                        for ($ii=$i; $ii < 10; $ii++) { ?>
                        <tr style="border-top:0px; <?=$ii<='1'?'display: table-row':'display: none'?>" class="tindakan<?=$ii?>">   
                         
                          <td colspan="1" class="col-md-10" align="left">
                            <select name="tindakan_umum[]" class="form-control sel2 sel2<?=$ii?>">
                                <option value=""></option>
                                <?php 
                                $this->db->order_by('name');
                                $i=1;
                                $arr = array('13');
                                $this->db->where_in('id_tindakan',$arr);
                                foreach ($this->Content_m->select_db('siak_re_account_chart')->result() as $key ) { 

                                if($key->id == '5803' && $ii == 1){
                                  $sel = 'selected';
                                }else{
                                  $sel = '';
                                }
                                ?>
                                  <option value="<?=$key->id?>" <?=$sel?> ><?=ucwords(strtolower($key->name))?> - <?=$this->Content_m->currency($key->price_umum)?> </option>
                                <?php $i++;}?>
                            </select>     
                          </td>
                          <td class="col-md-1" align="center" style="text-align: center; vertical-align: middle;"><a data-toggle="tooltip" data-placement="top" title="Hapus Tindakan" href="javascript:;" class="del_tindakan_umum" data-id="<?=$ii?>"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a></td>
                        </tr>
                        <?php }?>
                      </tbody>
                    </table>
                    <a class="btn btn-xs blue add_tindakan_umum" href="javascript:;" style="margin-top:10px !important">
                      <i class="fa fa-plus"></i>
                    </a>                           
                </div>
              </div> 
            </div>
          </div>
          <script type="text/javascript">

            var a2="2";
            $(".add_tindakan_umum").click(function(){
                $(".tindakan"+a2).css('display','table-row');
                a2++;
            });

            $(".del_tindakan_umum").click(function(){
                var b2= $(this).attr('data-id');
                $(".tindakan"+b2).css('display','none');
                $(".sel2"+b2).prop( "disabled", true );
                if(confirm("Hapus entry ini?")){
                  return true;
                }
            });


            $(".sel2").select2({
              placeholder: "Pilih .. ",
              language: "id"
            });

          </script>       


      </div>
      
    </div>

   
      
  
</div>
