<div class="col-lg-12 ">
    <section class="panel">
        <header class="panel-heading" style="min-height:120px">
            <div class="col-lg-3"> <span>Ref No : <?php echo $igedl_data['idl_ref_no'];?></span> </div>
            <div class="col-lg-6">
                <h4 class="text-center"><i class="fa fa-truck truck_icon"></i><br/> <b>ETC Cargo Limited(ICD018) - Container to be Verified(List)– Container Verification Officer </b></h4></div>
            <div class="col-lg-3"><span>Date : <?php echo $igedl_data['idl_date'];?></span></div>
        </header>
        <div class="clear"></div>
        <div class="panel-body">
            <form class="form-horizontal" method="post" action="<?php echo base_url();?>icd/cvo_ctrl/update_icd_container_cvo_verify_details/<?php echo $igedl_data['igedl_id'];?>">
                <div class="col-lg-12">
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Vessel Name </label>
                        <div class="col-lg-8">

							<input type="text" class="form-control" value="<?php echo $igedl_data['idl_vessel_name'];?>" readonly required>

                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Gate Entry No</label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['igedl_gate_entry_no'];?>" readonly>

                        </div>
                    </div>

                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Bill Of Lading </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['idl_bill_of_loading'];?>" readonly required>

                        </div>
                    </div>                    
                    
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Shipping Line </label>
                        <div class="col-lg-8">
							<input type="text" class="form-control" value="<?php echo $igedl_data['idl_shipping_line'];?>" readonly required>
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Payment Agency </label>
                        <div class="col-lg-8">
							<input type="text" class="form-control" value="<?php echo $igedl_data['pal_name'];?>" readonly required>
                        </div>
                    </div>   
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Initiated By</label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['igedl_initiated_by'];?>" readonly>

                        </div>
                    </div> 
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Proforma Invoice  </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['idl_proforma_invoice'];?>" readonly>

                        </div>
                    </div>     

                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Time In </label>
                        <div class="col-lg-8">
							<input type="text" class="form-control" value="<?php echo $igedl_data['idl_time_in'];?>" readonly >
                        </div>
                    </div>    
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Container Status </label>
                        <div class="col-lg-8">
							<input type="text" class="form-control" value="<?php echo $igedl_data['csl_name'];?>" readonly required>
                        </div>
                    </div>
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4 ">Type Of Cargo </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['ctl_name'];?>" readonly required>
                        </div>
                    </div> 
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4">Billing Reference </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['idl_bill_refer'];?>" readonly>
                        </div>
                    </div>      
                    <div class="form-group col-md-6">
                        <label class="col-lg-4 col-sm-4"> Destination </label>
                        <div class="col-lg-8">
                            <input type="text" class="form-control" value="<?php echo $igedl_data['idl_destination'];?>" readonly>
                        </div>
                    </div>              
                     
                                     

                                      
                    
                   
                </div>
                
				<header class="panel-heading">
                    <h4 class="text-center"> 
                        <b> Container Details </b>                    
                    </h4>
                </header>

                <div class="panel-body">
                    <section id="unseen">
                        <table class="table table-bordered table-striped table-condensed col-md-12">
                            <thead>
                                <tr>
                                    <th class="col-md-1">Container No </th>
                                    <th class="numeric col-md-1"> Size </th>
                                    <th class="col-md-1">  Type </th>
                                    <th class="col-md-1">  Status </th

                                </tr>
                            </thead>
                            <tbody id="tbody_id">   
                            <?php
                                foreach($icdl_list as $icdl_key=>$icdl_row){
                                    // var_dump();
                            ?>  
                                    <tr> 
                                        <td> 
                                            <select class="form-control container_no_cls" id="container_no_id_<?php echo $icdl_key;?>"  data-icdl_con_val="<?php echo $icdl_key;?>" name="ivcl_icdl_id[]" required>
                                                <option value="0">--Select--</option>
                                                <?php
                                                    foreach($icdl_list as $icdl_key1=>$icdl_row1){
                                                ?>
                                                        <option value="<?php echo $icdl_row1['icdl_id']; ?>"><?php echo $icdl_row1['icdl_c_no']; ?></option>
                                                        
                                                <?php
                                                    }
                                                ?>
                                            </select>

                                        </td>
                                        <td> 
                                            <input type="text" class="form-control" id="size_id_<?php echo $icdl_key;?>" readonly>  
                                        </td>
                                        <td> 
                                            <input type="text" class="form-control" id="type_id_<?php echo $icdl_key;?>" readonly>   
                                        </td>
                                        <td> 
                                            <input type="text" class="form-control" id="status_id_<?php echo $icdl_key;?>" readonly>  
                                        </td>
                                        
                                       
                                    </tr>
                            <?php
                                }
                            ?>
                            </tbody>
                        </table>

                        <div class=" col-lg-offset-5">
                            <div class="col-lg-2">
                                <button type="submit" class="btn btn-success"> <i class="fa fa-thumbs-up"></i>&nbsp; Save</button>
                            </div>

                        </div>

                    </section>
                </div>
                <!---->

            </form>
        </div>
    </section>

</div>



<script type='text/javascript'> 
    icdl_list = <?php echo json_encode($icdl_list);?>

    $('.container_no_cls').change(function() {
        this_id     = $(this).attr('id');
        con_val     = $('#'+this_id).data('icdl_con_val');
        this_val    = $('#'+this_id).val();
        $.each(icdl_list , function(i,n){
            if(n.icdl_id==this_val){
                $('#size_id_'+con_val).val(n.icdl_c_size);                
                $('#type_id_'+con_val).val(n.icdl_c_type);                
                $('#status_id_'+con_val).val(n.icdl_c_status);     

                $('#truck_no_id_'+con_val).attr("required", "true");                
                $('#trailer_no_id_'+con_val).attr("required", "true");               
                $('#driver_name_id_'+con_val).attr("required", "true");                
                $('#license_id_'+con_val).attr("required", "true");                
                $('#transporter_id_'+con_val).attr("required", "true");                
            }
        });

    });
</script>