

<?php $__env->startSection('content'); ?>
<!-- page start-->
 <!-- Content Header (Page header) -->
 <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1><?php echo e(__('Edit User')); ?></h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="#"><?php echo e(__('Home')); ?></a></li>
            <li class="breadcrumb-item active"><?php echo e(__('Edit User')); ?></li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>
  <!-- Main content -->
  <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
              <div class="card">
                  <div class="card-header">
                    <h3 class="card-title"><?php echo e(__('Edit Users')); ?></h3>                  
                    <span class="tools" style="float:right">
                      <a href="<?php echo e(route('user.index')); ?>" title="Back" class="btn btn-primary btn-sm"><i class="fa fa-reply"></i></a>
                    </span>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body"> 
                       
                    <form class="form-horizontal" id="user_edit_form" autocomplete="off" role="form" enctype="multipart/form-data" method="POST" action="<?php echo e(route('user.update', $userInfo->id )); ?>">
                        <?php echo csrf_field(); ?>
                        <?php echo e(method_field('PUT')); ?>

                        
                        <div class="form-group <?php $__errorArgs = ['user_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> has-error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                            <label for="user_name" class="col-lg-4 col-sm-4 control-label"><?php echo e(__('User Name')); ?> <span class="text-danger">*</span></label>
                            <div class="col-lg-8">
                                <input type="text" class="form-control" name="user_name" id="user_name" value="<?php echo e($userInfo->name); ?>" placeholder="Name" required maxlength="30">
                                 <?php if($errors->has('user_name')): ?>
                                    <p class="text-danger"><?php echo e($errors->first('user_name')); ?></p>
                                 <?php endif; ?>
                            </div>
                        </div>
                        <div class="form-group <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> has-error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                            <label for="email" class="col-lg-4 col-sm-4 control-label"><?php echo e(__('Email')); ?> <span class="text-danger">*</span></label>
                            <div class="col-lg-8">
                                <input type="email" class="form-control" name="email" id="email" value="<?php echo e($userInfo->email); ?>" placeholder="Email" required>
                                 <?php if($errors->has('email')): ?>
                                    <p class="text-danger"><?php echo e($errors->first('email')); ?></p>
                                 <?php endif; ?>
                            </div>
                        </div>
                        
                        
                        <div class="form-group <?php $__errorArgs = ['role'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> has-error <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                            <label class="col-lg-4 col-sm-4 control-label" for="role">Role <span class="text-danger">*</span></label>
                            <div class="col-lg-8">
                                <select id="role" name="role" class="form-control" required>
                                    <option value="" disabled="disabled" selected> -- Select Role -- </option>
                                    <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($role->name); ?>" <?php if($role->name == $userInfo->role): ?> selected="selected" <?php endif; ?>><?php echo e($role->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <div class="col-lg-offset-4 col-lg-8">
                                <button type="submit" id="userEditBtn" class="btn btn-primary"><?php echo e(__('Update User')); ?></button>
                                <a href="<?php echo e(route('user.index')); ?>" class="btn btn-warning"><?php echo e(__('Cancel')); ?></a>
                            </div>
                        </div>
                    </form>
                  </div>
              </div>
          </div>
        </div>
      </div>
  </section>

<!-- page end-->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.layout-admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\extranet\resources\views/pages/admin/user/edit.blade.php ENDPATH**/ ?>