<style type="text/css">
.col-md-2, .col-md-4, .col-md-6, .col-md-8{padding: 0px}
.panel-body{padding: 0px}
.form-inline{padding-bottom: 25px}
.form-inline .form-control{width: 100%}
</style>

<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-credit-card-alt"></i><?=$title?>
                </div>
            </div>
            <div class="portlet-body" id="page-content" style="display:nonee">
               
                <?= form_open('front_office/ugd_dir/ugd/save_laboratorium_paket', array('class'=>"form-horizontal") ) ?>
                <div class="panel-body">
      
                    <div class="form-group">
                      <label class="col-md-2 control-label"><br>Nama Paket</label>
                      <div class="col-sm-5">
                        <span style="font-size:9px"></span><br>
                        <select class="form-control select2 sel2_kebutuhan" required autocomplete="off" name="tindakan_lab" style="width:100%">
                          <option value=""></option>
                          <?php 
                          $this->db->where_in('id_tindakan',array('2','14','15','16','17'));
                          foreach ($this->Content_m->select_db('siak_re_account_chart')->result() as $key ) { ?>
                            <option value="<?=$key->id?>"><?=$key->name?></option>
                          <?php }?>
                        </select>
                      </div>
                    </div>


                    <?php for ($i1=0; $i1 <= 10; $i1++) { ?>
                    <div class="form-group request_note_detail<?=$i1?>" style="<?=$i1==0?'display: block':'display: none'?>">
                      <label class="col-md-2 control-label"><br><?php if($i1 == 0){echo "Item Paket";}?></label>
                      <div class="col-sm-5">
                        <span style="font-size:9px">Tindakan Lab</span><br>
                        <select class="form-control select2 sel2_kebutuhan kebutuhan<?=$i1?>" data-id="<?=$i1?>" requireds autocomplete="off" name="item_paket[]" style="width:100%">
                          <option value=""></option>
                          <?php 
                          $this->db->where_in('id_tindakan',array('2','14','15','16','17'));
                          foreach ($this->Content_m->select_db('siak_re_account_chart')->result() as $key ) { ?>
                            <option value="<?=$key->id?>"><?=$key->name?></option>
                          <?php }?>
                        </select>
                      </div>
                      <?php if($i1 != 0){ ?>
                      <div class="col-sm-1" style="padding-left: 0px; ">
                        <span style="font-size:9px"></span><br>
                        <div style="border:0px solid black; padding-top: 7px">
                        <a href="javascript:;" class="del" data-id="<?=$i1?>" style="background: red; color:#fff; padding:5px 10px; "><i class="fa fa-times"></i></a>
                        </div>
                      </div>
                      <?php }?>
                    </div>
                    <?php }?>
                    
                    
                    

                    <div class="form-group">
                      <label class="col-md-2 control-label"><br></label>
                      <div class="col-sm-2" style="">
                          <a href="javascript:;" class="add" style="background: green; color:#fff; padding:5px 10px; "><i class="fa fa-plus"></i></a>
                          <br><br><br>
                          <button type="submit" class="btn btn-primary">Create</button>
                      </div>
                    </div>

                    
                    
                  </div>
                </div>
                
                <?= form_close() ?>
             
            </div>
           
        </div>
    </div>
</div>

<script>
$( "#loading-content,#loading" ).fadeOut( "fast", function() {
    $( "#page-content" ).fadeIn("fast");
});

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

var c=1;
$(".add").click(function(){
  //alert(1);
  $(".request_note_detail"+c).css('display','block');
  c++;

  if(c >= 7){
    //alert("Maksimal 6 Entry");
  }
});


$(".del").click(function(){
  var ID=$(this).attr('data-id');
  $(".request_note_detail"+ID).css('display','none');
  
});


</script>





