
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
   <section class="content-header">
      <div class="container-fluid">
         <div class="row mb-2">
            <div class="col-sm-6">
               <h4>Update Vendor</h4>
            </div>
            <div class="col-sm-6">
               <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item"><a href="#">Home</a></li>
                  <li class="breadcrumb-item active">Update Vendor</li>
               </ol>
            </div>
         </div>
      </div>
      <!-- /.container-fluid -->
   </section>

   <section class="content">
      <div class="container">
         <div class="row"> 
            <div class="col-md-12 col-lg-12">
               <div class="container-fluid">
                  <div class="card card-default">
                     <div class="card-header">
                        <h3 class="card-title">Update Vendor</h3>
                        <div class="float-right">
                           <a href="<?php echo base_url() ?>/admin/vendor/view_all_users" class="btn btn-success btn-sm">View All Vendor</a>
                        </div>
                     </div>
                     <?php echo form_open('admin/vendor/update_stock_point/'.$user->user_id ); ?>
                     <div class="card-body">
                        <div class="row">
                           <div class="col-sm-12">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Name <span style="color:red">*</span></label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_stock_point_name" class="form-control" placeholder="Enter Vendor Name" required="required" value="<?php echo $user->user_stock_point_name; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-12">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Owner Name <span style="color:red">*</span></label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_name" class="form-control" placeholder="Enter Vendor Owner Name" required="required" value="<?php echo $user->user_name; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Email ID <span style="color:red">*</span></label>
                                 <div class="col-sm-12">
                                    <input type="email" name="user_email" class="form-control" placeholder="Enter Vendor Email ID" required="required" value="<?php echo $user->user_email; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Mobile No. <span style="color:red">*</span></label>
                                 <div class="col-sm-12">
                                    <input type="number" name="user_mobile" class="form-control" placeholder="Enter Vendor Mobile No. (** This is Login ID **)" required="required" value="<?php echo $user->user_mobile; ?>">
                                 </div>
                              </div>
                           </div>
                           <?php
                           $dist_leader = $user->user_work_dist;
                           ?>
                           <script type="text/javascript">
                           $( document ).ready(function() {
                                 get_partner_code_by_role("Taluka Head", <?php echo $user->user_work_state?>);
                                 get_dist_for_add_taluka_head(<?php echo $user->user_work_state?>, '<?php echo $dist_leader?>');
                                 get_taluka_by_dist_id('<?php echo $dist_leader?>', <?php echo $user->user_work_taulka?>);
                                 window.setTimeout(function() {
                                    $('#state_1').attr('readonly',true); 
                                    $("#state_1").css("pointer-events","none");
                                    $('#state_2').attr('readonly',true); 
                                    $("#state_2").css("pointer-events","none");
                                    $('#districtid').attr('readonly',true); 
                                    $("#districtid").css("pointer-events","none");
                                    $('#state_4').attr('readonly',true); 
                                    $("#state_4").css("pointer-events","none");
                                    $('#taluka_details').attr('readonly',true); 
                                    $("#taluka_details").css("pointer-events","none");
                                 }, 2000);
                           });
                           </script>
                           <div class="col-sm-12" id="info-data"></div>
                           <span id="alert-5"></span>
                           <div class="col-sm-12">
                              <div class="form-group row">
                                 <div class="col-sm-12">
                                   <input type="checkbox" id="s" value="1" > &nbsp;Do you want to edit the address?
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-12">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Address </label>
                                 <div class="col-sm-12">
                                    <textarea type="text" name="user_address" class="form-control" placeholder="Enter Vendor Address" ><?php echo $user->user_address; ?></textarea>
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Code </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_stock_point_code" class="form-control" placeholder="Enter Vendor Owner Pan Card No" readonly value="<?php echo $user->user_stock_point_code; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Owner Aadhar Card No </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_aadhar_card" class="form-control" placeholder="Enter Vendor Owner Aadhar Card No" value="<?php echo $user->user_aadhar_card; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Owner Pan Card No </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_pan_card" class="form-control" placeholder="Enter Vendor Owner Pan Card No" value="<?php echo $user->user_pan_card; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Bank Acc No </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_bank_acc" class="form-control" placeholder="Enter Vendor Bank Acc No" value="<?php echo $user->user_bank_acc; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Bank IFSC Code </label>
                                 <div class="col-sm-12">
                                    <input type="text" id="ifsc" name="user_bank_ifsc" class="form-control" placeholder="Enter Vendor Bank IFSC Code" value="<?php echo $user->user_bank_ifsc; ?>">
                                    <span id="alert_ifsc" class="text-danger"></span>
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Bank Name </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_bank_name" id="user_bank_name" class="form-control" placeholder="Enter Vendor Bank Name" readonly value="<?php echo $user->user_bank_name; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor Bank Branch Name </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_bank_branch" id="user_bank_branch" class="form-control" placeholder="Enter Vendor Bank Branch Name" readonly value="<?php echo $user->user_bank_branch; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-sm-6">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Vendor GST No. </label>
                                 <div class="col-sm-12">
                                    <input type="text" name="user_gst_no" class="form-control" placeholder="Enter Vendor GST No." value="<?php echo $user->user_gst_no; ?>">
                                 </div>
                              </div>
                           </div>
                        </div>
                        <div class="form-group row" id="submit_button-2">
                           <div class="offset-sm-0 col-sm-10">
                              <button  type="submit" class="btn btn-success setting-submit" name="submit">Save</button>
                           </div>
                        </div>   
                     </div>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
          </div>
         </div>
      </div>
   </div>
</section>
</div>
<style type="text/css">
#alert3
{
   display: none;
}
</style>