<?php $__env->startSection('title', 'Change User Profile'); ?>

<?php $__env->startPush('css'); ?>


<?php $__env->stopPush(); ?>
<?php $__env->startSection('content'); ?>
<div class="right_col" role="main">
  <div class="">
    <div class="clearfix"></div>
    <?php if(Session::has('success')): ?>
    <div class="alert alert-success">
      <?php echo e(Session::get('success')); ?>

    </div>
    <?php endif; ?>
    <?php if(Session::has('error')): ?>
    <div class="alert alert-danger">
      <?php echo e(Session::get('error')); ?>

    </div>
    <?php endif; ?>
    <div class="row">
      <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
          <div class="x_title">
            <h2>Profile Information </h2>
            <ul class="nav navbar-right panel_toolbox">
              <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
              </li>
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                <ul class="dropdown-menu" role="menu">
                  <li><a href="#">Settings 1</a>
                  </li>
                  <li><a href="#">Settings 2</a>
                  </li>
                </ul>
              </li>
              <li><a class="close-link"><i class="fa fa-close"></i></a>
              </li>
            </ul>
            <div class="clearfix"></div>
          </div>
          <div class="x_content">
            <form id="demo-form2" action="<?php echo e(route('profile.updateprofile')); ?>" method="POST" data-parsley-validate class="form-horizontal form-label-left" enctype="multipart/form-data">
              <?php echo e(csrf_field()); ?>

              <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Full Name <span class="required">*</span></label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" id="first-name" class="form-control col-md-7 col-xs-12" name="name" value="<?php echo e(Auth::user()->name); ?>" placeholder="Full Name">
                </div>
              </div>
              <div class="form-group">
                <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Phone</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input id="middle-name" class="form-control col-md-7 col-xs-12" type="text" name="phone" value="<?php echo e(Auth::user()->phone); ?>">
                </div>
              </div>
              <div class="form-group">
                <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Email</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input id="middle-name" class="form-control col-md-7 col-xs-12" type="text" name="email" value="<?php echo e(Auth::user()->email); ?>">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Address</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="text" class="form-control col-md-7 col-xs-12" name="address" value="<?php echo e(Auth::user()->address); ?>">
                </div>
              </div>
              <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12">Image</label>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <input id="profile_img" onChange="readURL(this)" name="image" class="form-control col-md-7 col-xs-12" type="file">
                </div>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <img src="<?php echo e(asset('storage/user/'.Auth::user()->image)); ?>" class="img-responsive img-thumbnail" id="profile_img_tag" width="170px" hight="150px" />
                </div>
              </div>
              <hr />
              <div class="form-group">
                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                  <a class="btn btn-xs btn-danger" href="<?php echo e(route('user.dashboard')); ?>">Cancel</a>
                  <button class="btn btn-xs btn-warning" type="reset">Reset</button>
                  <button type="submit" class="btn btn-xs btn-success">Update</button>
                </div>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
<script>
  function readURL(input) {
    //alert("jdfdfds")
    if (input.files && input.files[0]) {
      var reader = new FileReader();

      reader.onload = function(e) {
        $('#profile_img_tag').attr('src', e.target.result);
      }
      reader.readAsDataURL(input.files[0]);
    }
  }
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('backend.layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>