<?php $__env->startSection('content'); ?>
  <!-- page content -->
<div class="right_col" role="main">
  <div class="row x_panel">
    <div class="col-md-12 col-sm-12 col-xs-12">
    <h1>Register User</h1>

<form action="<?php echo url('/'); ?>/admin/register_user/add" id="" class="form-horizontal " method="post" enctype="multipart/form-data">
<?php echo e(csrf_field()); ?>


    


	<!-- First_name Start -->
	<div class="form-group">
	  <label for="first_name" class="col-sm-3 control-label"> First Name </label>
	  <div class="col-sm-4">
	    <input type="text" class="form-control" id="first_name" name="first_name" 
	    value="<?php echo e(old('first_name')); ?>">
	  </div>
	  <div class="col-sm-5">
      <div class="label label-danger"><?php echo e($errors->first("first_name")); ?></div>
      </div>
	</div> 
	<!-- First_name End -->


	


	<!-- Last_name Start -->
	<div class="form-group">
	  <label for="last_name" class="col-sm-3 control-label"> Last Name </label>
	  <div class="col-sm-4">
	    <input type="text" class="form-control" id="last_name" name="last_name" 
	    value="<?php echo e(old('last_name')); ?>">
	  </div>
	  <div class="col-sm-5">
      <div class="label label-danger"><?php echo e($errors->first("last_name")); ?></div>
      </div>
	</div> 
	<!-- Last_name End -->


	


	<!-- Email Start -->
	<div class="form-group">
	  <label for="email" class="col-sm-3 control-label"> Email </label>
	  <div class="col-sm-4">
	    <input type="text" class="form-control" id="email" name="email" 
	    value="<?php echo e(old('email')); ?>">
	  </div>
	  <div class="col-sm-5">
      <div class="label label-danger"><?php echo e($errors->first("email")); ?></div>
      </div>
	</div> 
	<!-- Email End -->


	


	<!-- Mobile Start -->
	<div class="form-group">
	  <label for="mobile" class="col-sm-3 control-label"> Mobile </label>
	  <div class="col-sm-4">
	    <input type="text" class="form-control" id="mobile" name="mobile" 
	    value="<?php echo e(old('mobile')); ?>">
	  </div>
	  <div class="col-sm-5">
      <div class="label label-danger"><?php echo e($errors->first("mobile")); ?></div>
      </div>
	</div> 
	<!-- Mobile End -->


	

				<!-- Address Start -->
			<div class="form-group">
			  <label for="address" class="col-sm-3 control-label"> Address </label>
			  <div class="col-sm-4">
			    <textarea class="form-control" id="address" name="address"><?php echo e(old('address')); ?></textarea>
			  </div>
			  <div class="col-sm-5">
         <div class="label label-danger"><?php echo e($errors->first("address")); ?></div>
      </div>
			</div> 
			<!-- Address End -->

			
	<!-- State Start -->
    <div class="form-group">
        <label for="state" class="control-label col-md-3"> State </label>
          <div class="col-md-4">
          <select id="state" name="state" class="form-control select2" onchange="getCity(this.value)">
            <option value="">Select</option>
            <?php
              foreach ($state as $value) {
                echo '<option value="'.$value->state_code.'"> '.$value->state.'</option>';
              }
            ?>
          </select>
        </div>
        <div class="col-sm-5">
         <div class="label label-danger"><?php echo e($errors->first("state")); ?></div>
      </div>
    </div>
      <!-- State End -->


	<!-- City Start -->
    <div class="form-group">
        <label for="city" class="control-label col-md-3"> City </label>
          <div class="col-md-4">
          <select id="city" name="city" class="form-control select2">
            <option value="">Select</option>
          </select>
        </div>
        <div class="col-sm-5">
         <div class="label label-danger"><?php echo e($errors->first("city")); ?></div>
      </div>
    </div>
      <!-- City End -->




	<!-- Pincode Start -->
	<div class="form-group">
	  <label for="pincode" class="col-sm-3 control-label"> Pincode </label>
	  <div class="col-sm-4">
	    <input type="text" class="form-control" id="pincode" name="pincode" 
	    value="<?php echo e(old('pincode')); ?>">
	  </div>
	  <div class="col-sm-5">
      <div class="label label-danger"><?php echo e($errors->first("pincode")); ?></div>
      </div>
	</div> 
	<!-- Pincode End -->


	

    <!-- Photo_id Start -->
    <div class="form-group">
      <label for="address" class="col-sm-3 control-label"> Photo Id </label>
      <div class="col-sm-6">
      <input type="file" name="photo_id" />
      <input type="hidden" name="old_photo_id" value="<?php if (isset($photo_id) && $photo_id!=""){echo $photo_id; } ?>" />
        <?php if(isset($photo_id_err) && !empty($photo_id_err)) 
        { foreach($photo_id_err as $key => $error)
        { echo "<div class=\"error-msg\"></div>"; } }?>
      </div>
        <div class="col-sm-3" >
      </div>
      <div class="col-sm-5">
        <div class="label label-danger"><?php echo e($errors->first("photo_id")); ?></div>
      </div>
    </div>
    <!-- Photo_id End -->

    

    <!-- Address_proof Start -->
    <div class="form-group">
      <label for="address" class="col-sm-3 control-label"> Address Proof </label>
      <div class="col-sm-6">
      <input type="file" name="address_proof" />
      <input type="hidden" name="old_address_proof" value="<?php if (isset($address_proof) && $address_proof!=""){echo $address_proof; } ?>" />
        <?php if(isset($address_proof_err) && !empty($address_proof_err)) 
        { foreach($address_proof_err as $key => $error)
        { echo "<div class=\"error-msg\"></div>"; } }?>
      </div>
        <div class="col-sm-3" >
      </div>
      <div class="col-sm-5">
        <div class="label label-danger"><?php echo e($errors->first("address_proof")); ?></div>
      </div>
    </div>
    <!-- Address_proof End -->

    

	<!-- Status Start -->
	<div class="form-group">
        <label class="control-label col-md-3">Status</label>
         <div class=" col-md-4 switch">
                    <div class="onoffswitch">
     <input type="checkbox" class="onoffswitch-checkbox"  data-on-label="Yes" data-off-label="No"  name="status" value="0" id="status"  style="width:20px; height:20px;"/>
    <?php echo e($errors->first("status")); ?>

                        <label class="onoffswitch-label" for="status">
                            <span class="onoffswitch-switch"></span>
                            <span class="onoffswitch-inner"></span>
                        </label>
                    </div>
                </div>

      </div>
      <!-- Status End -->



  <div class="form-group">
    <div class="col-sm-3" >
      </div>
      <div class="col-sm-6">
    <button type="reset" class="btn btn-default ">Reset</button>
    <button type="submit" class="btn btn-info ">Submit</button>
      </div>
        <div class="col-sm-3" >
      </div>
  </div>
</form>



    </div>
  </div>
</div>
<!-- /page content -->
<script type="text/javascript">
  function getCity(state_id)
  {
    $.ajax({
      type:'get',
      url:'<?php echo e(url("/")); ?>/getCity/'+state_id,
      success:function(res)
      {
        var city = '';
        if(res.length>0)
        {
          city+='<option value="">Select</option>';
          for(var i=0;i<res.length;i++)
          {
            city+='<option value="'+res[i].city_id+'">'+res[i].city+'</option>';
          }
          $('#city').html(city);
        }
      }
    });
  }
</script>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>