<?php $__env->startSection('content'); ?>
<div class="container" id="previewDiv">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="panel panel-default">
                <div class="panel-heading"><?php echo app('translator')->getFromJson('common.user'); ?>  <?php echo app('translator')->getFromJson('common.edit'); ?></div>

                <div class="panel-body">
                    <form action="<?php echo e(url('users/' . $user->id)); ?>" method="POST">
                        <input type="hidden" name="_method" value="put">
                        <?php echo e(csrf_field()); ?>


                        <div class="form-group">
                            <label for="name"><?php echo app('translator')->getFromJson('common.name'); ?></label>
                            <input type="text" class="form-control" id="name" name="name" value="<?php echo e(old('name', $user->name)); ?>">
                        </div>

                        <div class="form-group">
                            <label for="email"><?php echo app('translator')->getFromJson('common.email'); ?></label>
                            <input type="text" class="form-control" id="email" name="email" value="<?php echo e(old('email', $user->email)); ?>">
                        </div>

                        <div class="form-group">
                            <label for="role_id"><?php echo app('translator')->getFromJson('common.role'); ?></label>
                            <select class="form-control" id="role_id" name="role_id">
                                <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($role->id); ?>" <?php echo e(!($role->id == old('role_id', $user->role_id)) ?: 'selected="selected"'); ?> ><?php echo e($role->display_name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>

                        <div class="form-group">
                            <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('common.update'); ?></button>
                            <a class="btn btn-link" href="<?php echo e(url('users')); ?>"><?php echo app('translator')->getFromJson('common.cancel'); ?></a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#previewDiv :input").attr("disabled", true); 
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>