<script type="text/javascript">
   /*  $(document).ready(function () {
  
         $("#excel_upload").validate({
            rules: {
                name: {
                    required: true
                },
                
                
                
                email: {
                    required: true
                },
                mobile: {
                    required: true
                },
                 
                  status: {
                    required: true,
                }
            },
            messages: {
                name: {
                    required: "Please specify Name "
                },
                
                email: {
                    required: "Please specify email "
                },
                mobile: {
                    required: "Please specify Mobile"
                },
               
                 status: {
                    required: "Please specify Member Status"
                }
            }
        });

    });*/
    $(document).ready(function () {
$("#name").val(0)
$("#email").val(1)
$("#place_category").val(2)
$("#district_id").val(3)
$("#taluk_id").val(4)
$("#block_id").val(5)
$("#corporation").val(6)
$("#muncipality").val(7)
$("#cds").val(9)
$("#ads").val(10)
$("#constitution").val(11)
$("#username").val(12)
$("#panchayath").val(8)
$(".loader-wrapper").hide();
//addAttr()
$('.add').hide();

});
function removeAttr()
  {
    $('.add').show();
    $('.remove').hide();
    $('#name').prop('disabled', false);
    $('#email').prop('disabled', false);
    $('#place_category').prop('disabled', false);
    $('#district_id').prop('disabled', false);
    $('#taluk_id').prop('disabled', false);
    $('#block_id').prop('disabled', false);
    $('#corporation').prop('disabled', false);
    $('#cds').prop('disabled', false);
    $('#ads').prop('disabled', false);
    $('#constitution').prop('disabled', false);
    $('#username').prop('disabled', false);
    $('#muncipality').prop('disabled', false);
  }
function addAttr()
  {
    $('.add').hide();
    $('.remove').show();
    $('#name').prop('disabled', 'disabled');
    $('#email').prop('disabled', 'disabled');
    $('#place_category').prop('disabled', 'disabled');
    $('#district_id').prop('disabled', 'disabled');
    $('#taluk_id').prop('disabled', 'disabled');
    $('#block_id').prop('disabled', 'disabled');
    $('#corporation').prop('disabled', 'disabled');
    $('#cds').prop('disabled', 'disabled');
    $('#ads').prop('disabled', 'disabled');
    $('#constitution').prop('disabled', 'disabled');
    $('#username').prop('disabled', 'disabled');
    $('#muncipality').prop('disabled', 'disabled');
  }  
</script>
<style type="text/css">
  .add{
    cursor: pointer;
  }
  .remove{
    cursor: pointer;
  }
</style>
<div id="page-wrapper">
  <div class="container-fluid"> 
    <!-- Page Heading -->
    <div class="row">
      <div class="col-lg-12"><p class="pull-right">
      <i class="fa fa-wrench remove" aria-hidden="true" onclick="removeAttr();"></i>
      <i class="fa fa-times add" aria-hidden="true" onclick="addAttr();"></i></p>
        <h4 class="page-header"> Import excel file for Agent </h4>
        
      </div>
      
      <div class="col-md-12">
      <div class="bg-widget">
    <?php 
        $attributes = array('id' => 'excel_upload', 'name' => 'excel_upload' , 'onSubmit' => 'return validate1()');
        echo form_open_multipart('user/import_content', $attributes);  ?>
       
       <div class="row">
  <div class="col-sm-2">
        <div class="form-group"><?php echo form_label('Name');?></div>
        <div class="form-group">
              <select name="name" id="name" required="required" class="form-control">
                    <option value="">Select Excel Field</option>
                    <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                    <option value="<?php echo $i; ?>" ><?php echo $excel_val; ?></option>
                    <?php $i++; } ?>
              </select>
        
        </div>
        </div>
  <div class="col-sm-2">
        <div class="form-group"><?php echo form_label('Email');?></div>
        <div class="form-group">
              <select name="email" id="email" required="required" class="form-control">
        		        <option value="">Select Excel Field</option>
        		        <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                    <option value="<?php echo $i; ?>" ><?php echo $excel_val; ?></option>
                    <?php $i++; } ?>
        	    </select>
        
        </div>
          </div>
  <div class="col-sm-2">
        <div class="form-group"><?php echo form_label('Rural / Urban');?></div>
        <div class="form-group">
              <select name="place_category" id="place_category" required="required" class="form-control">
                    <option value="">Select Excel Field</option>
                    <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                    <option value="<?php echo $i; ?>" ><?php echo $excel_val; ?></option>
                    <?php $i++; } ?>
              </select>
        
        </div>
          </div>        
  <div class="col-sm-2">
        <div class="form-group"><?php echo form_label('District');?></div>
        <div class="form-group">
          <select name="district_id" id="district_id" required="required" class="form-control">
            <option value="">Select Excel Field</option>
            <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                  <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                 <?php $i++; } ?>
          </select>
        </div>
     </div>
           <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Taluk');?></div>
        <div class="form-group">
             <select name="taluk_id" id="taluk_id" required="required" class="form-control">
            		<option value="">Select Excel Field</option>
            		<?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
        	   </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Block');?></div>
        <div class="form-group">
             <select name="block_id" id="block_id" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Corporation');?></div>
        <div class="form-group">
             <select name="corporation" id="corporation" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Muncipality');?></div>
        <div class="form-group">
             <select name="muncipality" id="muncipality" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Cds');?></div>
        <div class="form-group">
             <select name="cds" id="cds" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Ads');?></div>
        <div class="form-group">
             <select name="ads" id="ads" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
          <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Constitution');?></div>
        <div class="form-group">
             <select name="constitution" id="constitution" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div> 
<div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Username');?></div>
        <div class="form-group">
             <select name="username" id="username" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>
 <div class="col-sm-2">     
        <div class="form-group"><?php echo form_label('Panchayath');?></div>
        <div class="form-group">
             <select name="panchayath" id="panchayath" required="required" class="form-control">
                <option value="">Select Excel Field</option>
                <?php $i=0; foreach ($excel_fields as $excel_val) { ?>
                <option value="<?php echo $i; ?>"><?php echo $excel_val; ?></option>
                <?php $i++; } ?>
             </select>
        </div>
          </div>		  
</div>
       
      
<div class="text-center" style="margin-top:30px;"> 
<input type="hidden" name="file_name" value="<?php echo $file_name; ?>">
 <?php
                            $submit_btn = array(
                                'type' => 'submit',
                                'name' => 'submit',
                                'value' => 'IMPORT',
                                'id' => 'submit',
                                'class' => 'btn btn-success',
                                'tabindex' => '4',
                                'onclick'=>'showLoader();'
                            );
        echo form_submit($submit_btn);
        ?>

</div>
</form>

 </div>
      </div>
      <div class="col-md-4">
        
        <!--<img src="<?php echo base_url(); ?>/images/loaders.svg" alt="kudumbashree" id="loader">-->
        <div class="loader-wrapper" >
 <div class="loader-container">
   <div class="loader" id="loader">Loading...</div>
 </div>
</div>
      </div>
    </div>
  </div>
</div>


