<link rel="stylesheet" type="text/css" href="<?php echo e(url('dropzone/dist/min/dropzone.min.css')); ?>">
<style>              
.img-prew{
width: 100px;
height: 100px;
margin-top: -95px;
border-radius: 50%;
margin-left: -5px;
       }
.post-imgPrw{
height: 50px;
margin-left: 10px;
width: 50px;
margin-top: 0px;
       }   
       

.invalid-feedback {
  display:block;
}
.image img {
    width: 247px;
    height: 271px;
    object-fit: cover;
}
</style>
<?php $__env->startSection('content'); ?>
<div class="common-content">
          <div class="page-content">
                <div class="page-heading">
                    <div class="headings">
                        <h6>Edit Buyer</h6>
                    </div>
                </div>
                <form method="POST" id="add_buyer" action="<?php echo e(url('admin/updatebuyer')); ?>"  enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <div class="dashboard-cnts">
                    <div class="bid-stats bidplace">
                        <div class="row">

                          
                            <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Name</label>
                                        <input type="hidden" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="userid" id="name" value="<?php echo e($getbuyer->id); ?>" required autocomplete="name" autofocus>
                                        <input type="text" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="name" id="name" value="<?php echo e($getbuyer->name); ?>" required autocomplete="name" autofocus>
                                        <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Email</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="email" name="email" value="<?php echo e($getbuyer->email); ?>" readonly autocomplete="email" autofocus>
                                        <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Password</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="password" name="password" value="<?php echo e($getbuyer->original_password); ?>" required autocomplete="password" autofocus>
                                        <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>

                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Address</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="address" name="address" value="<?php echo e($getbuyer->address); ?>" required autocomplete="address" autofocus>
                                        <?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Country</label>
                                        
					<select class="form-control <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="country" name="state">
                                        	<option>Select</option>
                                        	<option value="101"  selected >India</option>
                                        </select>
                                        <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>State</label>
                                       
					<select class="form-control <?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="state"  name="city" required autocomplete="city" autofocus>
                                        <option>Select</option>
                                        <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($state->id); ?>" <?php if($getbuyer->city == $state->id) {?> selected <?php } ?>><?php echo e($state->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                        <?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Zipcode</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['zipcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="zipcode" name="zipcode" value="<?php echo e($getbuyer->zipcode); ?>" required autocomplete="zipcode" autofocus>
                                        <?php $__errorArgs = ['zipcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Phone No</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="phone_no" name="phone_no" value="<?php echo e($getbuyer->phone_no); ?>" readonly autocomplete="phone_no" autofocus>
                                        <?php $__errorArgs = ['phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Contact Person Name</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['contact_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="contact_name" name="contact_name" value="<?php echo e($getbuyer->contact_name); ?>" required autocomplete="contact_name" autofocus>
                                        <?php $__errorArgs = ['contact_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Contact Person Phone No</label>
                                        <input type="text" class="form-control <?php $__errorArgs = ['contact_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="contact_phone_no" name="contact_phone_no" value="<?php echo e($getbuyer->contact_phone_no); ?>" required autocomplete="contact_phone_no" autofocus>
                                        <?php $__errorArgs = ['contact_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback" role="alert">
                                                <strong><?php echo e($message); ?></strong>
                                            </span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>

                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Buyer Type</label>
                                        <select id="buyer_type" class="form-control <?php $__errorArgs = ['buyer_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sel1" name="buyer_type"  required autocomplete="buyer_type" autofocus>
                                        <option value="">Select</option>
                                        <option value="Hospital" <?php if($getbuyer->buyer_type == "Hospital"){?>selected<?php } ?>>Hospital</option>
                                        <option value="Medical College" <?php if($getbuyer->buyer_type == "Medical College"){?>selected<?php } ?>>Medical College</option>
                                        <option value="Industry" <?php if($getbuyer->buyer_type == "Industry"){?>selected<?php } ?>>Pharma Industry</option>
                                       </select>
                                      <?php $__errorArgs = ['buyer_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($message); ?></strong>
                                    </span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>

                              

                             <!-- <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                     <label>Affliate Phone No</label>
                                       <input type="text" id="affilate_phone_no" class="form-control <?php $__errorArgs = ['affilate_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="affilate_phone_no" value="<?php echo e($getbuyer->affilate_phone_no); ?>" required autocomplete="affilate_phone_no" autofocus>
                                       <?php $__errorArgs = ['affilate_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($message); ?></strong>
                                    </span>
                                      <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                      </div>
                                </div>
                              </div>-->
                              

                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Image</label><?php //print_r($getbuyer->pro_pic); ?>
                                        <div class="custom-file" style="margin-bottom: 25px;">
                                            <!-- <input type="file" class="custom-file-input" id="customFile" name="productcatalouge">
                                            <label class="custom-file-label" for="customFile">Browse</label> -->
                                            <div class="dropzone dz-clickable Dz-box happy-box" id="dropzonewidget" onClick="changePicimage()"  style="width: 120px;">
                                              <?php if(!empty($getbuyer->pro_pic)): ?>
                                              <img src="<?php echo e(url('user_files')); ?>/<?php echo e($getbuyer->pro_pic); ?>" title="Click here to upload"  id="uploadimageimage" style="border-style: outset;width: 50px;height: 50px;cursor: pointer;">
                                              <?php else: ?>
                                              <img src="<?php echo e(url('assets/images/upload.png')); ?>" title="Click here to upload"  id="uploadimageimage" style="border-style: outset;width: 50px;height: 50px;cursor: pointer;">
                                              <?php endif; ?>
                                              <input type="file" name="productimage" id="post_imageimage" onchange="readURLimage(this);" style="display:none">

                                              <img id="blahimage" src="#" class="post-imgPrw" style="display:none"/> 
                                              <iframe id="blah1image"  class="post-imgPrw" style="display:none" src="#">
                                              </iframe>
                                            </div>
                                          </div>
                                      </div>                    
                                      </div>
                              </div>

                               <?php 
                              if($getbuyer->buyer_type == "Hospital"){?>
                                <?php if(!empty($getbuyer->certificate1)): ?>
                               <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>GST</label>
                                        <div class="custom-file">
                                            
                                            <div class="dropzone dz-clickable Dz-box happy-box" style="width: 120px;">
                                              
                                               <a target="_blank" class="eye" href="https://meddbot.com/uploaded_files/<?php echo e($getbuyer->certificate1); ?>"><i class="fa fa-eye" aria-hidden="true"></i>View</a>
                                             
                                              
                                             
                                            </div>
                                          </div>
                                      </div>                    
                                      </div>
                              </div>
                              <?php endif; ?>
                              <?}?>
                              <?php 
                              if($getbuyer->buyer_type == "Medical College"){?>
                                 <?php if(!empty($getbuyer->certificate1)): ?>
                               <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>Medical College Registration certificate from MCI</label>
                                        <div class="custom-file">
                                            
                                            <div class="dropzone dz-clickable Dz-box happy-box" style="width: 120px;">
                                             
                                               <a target="_blank" class="eye" href="https://meddbot.com/uploaded_files/<?php echo e($getbuyer->certificate1); ?>"><i class="fa fa-eye" aria-hidden="true"></i>View</a>
                                             
                                             
                                             
                                            </div>
                                          </div>
                                      </div>                    
                                      </div>
                              </div>
                               <?php endif; ?>
                               <?php if(!empty($getbuyer->certificate2)): ?>
                              <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>GST/VAT</label>
                                        <div class="custom-file">
                                            
                                            <div class="dropzone dz-clickable Dz-box happy-box" style="width: 120px;">
                                              
                                               <a target="_blank" class="eye" href="https://meddbot.com/uploaded_files/<?php echo e($getbuyer->certificate2); ?>"><i class="fa fa-eye" aria-hidden="true"></i>View</a>
                                             
                                             
                                             
                                            </div>
                                          </div>
                                      </div>                    
                                      </div>
                              </div>
                               <?php endif; ?>
                              <?}?>

                              <?php 
                              if($getbuyer->buyer_type == "Industry"){?>
                                <?php if(!empty($getbuyer->certificate1)): ?>
                               <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group">
                                        <label>GST/VAT</label>
                                        <div class="custom-file">
                                            
                                            <div class="dropzone dz-clickable Dz-box happy-box" style="width: 120px;">
                                              
                                               <a target="_blank" class="eye" href="https://meddbot.com/uploaded_files/<?php echo e($getbuyer->certificate1); ?>"><i class="fa fa-eye" aria-hidden="true"></i>View</a>
                                             
                                              
                                             
                                            </div>
                                          </div>
                                      </div>                    
                                      </div>
                              </div>
                              <?php endif; ?>
                              <?}?>
                              
                              <div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                     <div class="form-group rs-form-group">
                                        <label> Description</label>
                                        <textarea rows='5' name="description" required><?php echo e($getbuyer->description); ?></textarea>
                                      </div>
                                </div>
                              </div>
                       


                                           
                    </div>
                         <div class="row">
                         <div class="col-12">
                            <div class="green-button green-button2">
                                <button id="create">Submit</button>
                             </div> 
                         </div>
                      </div>
                </div>
                </form>
          </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script src="<?php echo e(url('dropzone/dist/min/dropzone.min.js')); ?>" type="text/javascript"></script>

<script>  

function readURLimage(input) {
  if (input.files && input.files[0]) {
        
    var file = input.files[0];
    var fileType = file["type"];

var validImageTypes = ["image/png", "image/jpeg", "image/png"];
if ($.inArray(fileType, validImageTypes) < 0) {
     
     var reader = new FileReader();

            reader.onload = function (e) {
                $('#blah1image')
                    .attr('src', e.target.result)
            };

            reader.readAsDataURL(input.files[0]);
}
else{

   var reader = new FileReader();

            reader.onload = function (e) {
                $('#blahimage')
                    .attr('src', e.target.result)
            };

            reader.readAsDataURL(input.files[0]);
  }
       
 }
    }

  function changePicimage(){ 
      
      document.getElementById('post_imageimage').click();
      
          $('#post_imageimage').change(function() {
             var filename = $('#post_imageimage').val();
 
        var fileExtension = ['jpeg', 'jpg', 'png', 'gif'];
        if ($.inArray(filename.split('.').pop().toLowerCase(), fileExtension) == -1) {
        
                 if(filename){
                 $('#blahimage').hide();
                 $('#blah1image').show();
                 $('#uploadimageimage').hide();
                $(".invalid-feedback").css("display", "none");

              }
              $('#post_imageimage').html(filename);
           
        }
        else{
        
           if(filename){
                $('#blah1image').hide();
                $('#blahimage').show();
                $('#uploadimageimage').hide();
                $(".invalid-feedback").css("display", "none");

              }
              $('#post_imagereport').html(filename);
        
        }  
       });
    }

$('#country').on('change', function() {
      var countryid = this.value;
      var APP_URL = <?php echo json_encode(url('/getstates1')); ?> ;
      var saveData = $.ajax({
            type: 'GET',
            url: APP_URL+'/'+countryid,
            data: { countryid: countryid, _token: '<?php echo e(csrf_token()); ?>' },
            dataType: "text",
            success: function(resultData) { 
              $("#state").html(resultData);
            }
            });
            
    });
</script>
<script>
$("#create").click(function(){
    //alert("bbbb");
	$("#add_buyer").validate({
		ignore: [],
        rules: {
            "name": {
                required: true
               
            },
			"email": {
                required: true
               
            },
			"password": {
                required: true,
                minlength: 8
               
            },
            "address": {
                required: true
               
            },
            "state": {
                required: true
               
            },
            "city": {
                required: true
               
            },
            "zipcode": {
                required: true
               
            },
            "phone_no": {
                required: true
               
            },
             "contact_name": {
                required: true
               
            },
             "contact_phone_no": {
                required: true
               
            }, 
            "buyer_type": {
                required: true
               
            },
           
            "description": {
                required: true
               
            },
            
        },
        submitHandler: function(form, e) {
             $(".pageloader").show();
            $(".pageloader").delay(5000).fadeOut("slow");
		   form.submit();
        }
    });
});
$(function(){
    $('#add_buyer').on('submit', function(event){
        event.preventDefault();
       
    });
});
</script>


 


<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main_admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/admin/editbuyer.blade.php ENDPATH**/ ?>