
<?php $__env->startSection('content'); ?>
<div class="az-content-breadcrumb">
        <span>Users</span>
        <span>Edit User</span>
        
        
    </div>
    <h2 class="az-content-title" style="display: inline">USERS <span><a href="<?php echo e(url('users')); ?>"
                class="btn btn-az-primary" style="float: right">Edit User</a></span></h2>
<div class="separator-breadcrumb border-top"></div>
<div class="row">
    <div class="col-md-12 col-lg-12 col-xl-12">
        <div class="card card-body pd-40">
            <h5 class="card-title mg-b-20">Add User Details</h5>
            <?php if(Session('alert')): ?>
            <div class="alert alert-card alert-<?php echo Session('alert-class'); ?>" role="alert">
                <?php echo Session('alert'); ?>
                <button class="close" type="button" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <?php endif; ?>



            <form action="<?php echo e(url('users/update/'.\Crypt::encrypt($users->id))); ?>" method="post" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <?php if(count($errors) > 0): ?>
                <div class="p-1">
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="alert alert-warning alert-danger fade show" role="alert"><?php echo e($error); ?>

                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                <?php endif; ?>
                <input type="hidden" name="u_id" value="<?php echo e(\Crypt::encrypt($users->id)); ?>">
                <div class="row row-sm mg-b-20">

                    <div class="col-md-4">

                        <div class="form-group">
                            <label class="az-content-label tx-11 tx-medium tx-gray-600">User Name</label>
                            <input name="name" id="name" class="form-control"  value="<?php echo e(old('name') ?: $users->name); ?>" />
                            <?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="form-text text-muted" >
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <label class="az-content-label tx-11 tx-medium tx-gray-600" for="email">Email</label>
                            <input name="email" id="email" class="form-control" value="<?php echo e(old('email') ?: $users->email); ?>" />
                            <?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="form-text text-muted" >
                                <strong><?php echo e($message); ?></strong>
                            </span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <label class="az-content-label tx-11 tx-medium tx-gray-600" for="role_id">Role</label>
                         <select id="role_id" name="role_id" class="form-control" >
                            <option value="0">Select</optoin>
                                <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option <?php echo e($users->role_id == $role['id_roles'] || old('role_id') == $role['id_roles'] ? 'selected' : ''); ?> value="<?php echo e($role['id_roles']); ?>"><?php echo e($role['name']); ?></option>

                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>

                        <?php $__errorArgs = ['role_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <span class="form-text text-muted" >
                            <strong><?php echo e($role_id); ?></strong>
                        </span>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div class="col-md-6">
                        <label class="az-content-label tx-11 tx-medium tx-gray-600" for="password">Password </label>
                    <input type="password" name="password" id="password" class="form-control" value="" />
                    <?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="form-text text-muted" >
                        <strong><?php echo e($message); ?></strong>
                    </span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>

                    <div class="col-md-6">
                         <label class="az-content-label tx-11 tx-medium tx-gray-600" for="confirm_password">Confirm Password </label>
                    <input type="password" name="password_confirmation" id="confirm_password" class="form-control" value="" />
                    <?php $__errorArgs = ['password_confirmation'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <span class="form-text text-muted" >
                        <strong><?php echo e($message); ?></strong>
                    </span>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    
                    <div class="col-md-12">
                            <div class="row row-sm mg-b-20">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label class="az-content-label tx-11 tx-medium tx-gray-600">User Status <span class="text-danger"><b>*</b></span></label>
                                        <select name="status" id="" class="form-control" required>
                                            <option <?php if($users->status == 1): ?> Selected <?php endif; ?> value="1">Active
                                            </option>
                                            <option <?php if($users->status == 0): ?> Selected <?php endif; ?> value="2">
                                                In-Active</option>
                                        </select>
                                    </div>
                                </div>

                            </div>
                        </div>
                </div>

                

               <button type="button" onclick="history.back()" class="btn btn-danger btn-block mt-2">
                        Cancel
                    </button>
                    <button type="submit" class="btn btn-az-primary btn-block mt-2" style="float: right">
                        Submit
                    </button>
            </form>


        </div>
    </div>
</div><!-- end of main-content -->
<script src="https://cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
<script>

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

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\mds-scm\resources\views/Users/edit.blade.php ENDPATH**/ ?>