<?php $__env->startSection("pagecss"); ?>
<link href="<?php echo e(URL::asset('')); ?>assets/vendors/general/toastr/build/toastr.css" rel="stylesheet" type="text/css" />
<link href="<?php echo e(URL::asset('')); ?>assets/css/demo3/style.bundle.css" rel="stylesheet" type="text/css" />  
<?php $__env->stopSection(); ?>
<?php $__env->startSection("content"); ?>
<div class="row">
  <div class="col-lg-12">
    <div class="kt-portlet">
      <div class="kt-portlet__head">
        <div class="kt-portlet__head-label">
          <h3 class="kt-portlet__head-title">
          Change Password
          </h3>
        </div>
        <div class="kt-portlet__head-toolbar">
				  <div class="kt-portlet__head-wrapper">
								<a href="<?php echo $_SERVER['HTTP_REFERER'] ?>" class="btn btn-primary text-white btn-icon-sm">
							<i class="la la-long-arrow-left"></i>Back</a>
          </div>
        </div>
      </div>
	<!--begin::Form-->
      <form class="kt-form kt-form--label-right" role="form" id="password_form" action="<?php echo e(URL::asset('/')); ?>profile/update/<?php echo e($profile->id); ?>" method="post">
        <div class="kt-portlet__body">
        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
          <div class=" row">
            <div class="form-group col-lg-6">
              <label>Password</label>
              <input type="password" value="<?php echo e(old('password')); ?>" class="form-control" name="password" required>
              <span class="form-text text-muted">Please enter password</span>
            </div>
            <div class=" form-group col-lg-6">
              <label>Confirm Password</label>
              <input type="password" value="<?php echo e(old('c_password')); ?>" class="form-control" name="c_password" required>
              <span class="form-text text-muted">Please confirm password</span>
            </div>
          </div>
          <div class="kt-space-40"></div>      
          <div class="kt-space-40"></div>      
          <div class="kt-space-40"></div>      
          <div class="kt-portlet__foot">
            <div class="kt-form__actions">
              <div class="row">
                <div class="col-lg-5"></div>
                <div class="col-lg-6">
                  <button type="submit"class="btn btn-primary">Submit</button>
                  <button type="reset" class="btn btn-secondary">Clear</button>
                </div>
              </div>
            </div>
          </div>
      </form>
      <!--end::Form-->
    </div>
  </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection("pagejs"); ?>
<script src="<?php echo e(URL::asset('/')); ?>assets/js/scripts.bundle.js" type="text/javascript"></script>
<script src="<?php echo e(URL::asset('')); ?>assets/vendors/general/toastr/build/toastr.min.js" type="text/javascript"></script>
<script src="<?php echo e(URL::asset('/')); ?>assets/vendors/general/jquery-validation/dist/jquery.validate.js" type="text/javascript"></script>
<script src="<?php echo e(URL::asset('/')); ?>assets/vendors/general/jquery-validation/dist/additional-methods.js" type="text/javascript"></script>
<script src="<?php echo e(URL::asset('/')); ?>assets/vendors/custom/js/vendors/jquery-validation.init.js" type="text/javascript"></script>

<script>

$( "#password_form" ).validate({
  // define validation rules
  rules: {
      password: {
              required: true 
          },
      c_password: {
          required: true,
         
      }
  },
  //display error alert on form submit  
  invalidHandler: function(event, validator) {     
  },

  submitHandler: function (form) {
      form[0].submit(); // submit the form
  }
});
</script>
<?php if($errors->any()): ?>
  <?php foreach($errors->all() as $error): ?>
    <script>toastr.warning("Sorry", "<?php echo e($error); ?>"); </script> 
  <?php endforeach; ?>
<?php endif; ?>
<?php if(Session::has("message")): ?>
  <script>toastr.success("Successfully", "<?php echo e(Session::get("message")); ?>"); </script> 
<?php endif; ?>
<?php if(Session::has("error")): ?>
  <script> toastr.error("Sorry", "<?php echo e(Session::get("error")); ?>"); </script>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make("app", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>