<?php $__env->startSection('content'); ?>
<?php if(session()->has('message')): ?>
<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
<div class="col-md-4 alert alert-<?php echo e(session('type')); ?> alert-dismissible" style="font-size:18px;font-weight:bold;width:400px;margin-left:15px">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <?php echo session('message'); ?>

              </div>
              </div> 
<?php endif; ?>

<div class="row">
        <!-- left column -->
        <div class="col-md-2"></div>
        <div class="col-md-8">
          <!-- general form elements -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">Edit User  </h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form   role="form" method="POST" action="<?php echo e(url('/user/edit')); ?>">
                        <?php echo e(csrf_field()); ?>

              <div class="box-body">

              <div class="form-group">
                  <label for="exampleInputPassword1">Name - الاسم</label>
                  <input type="text" name="name" value="<?php echo e($user->name); ?>" class="form-control"  placeholder="username - login name " required>
                </div> 
                <div class="form-group">
                  <label for="exampleInputPassword1">Username - Login Email</label>
                  <input type="text" name="email" value="<?php echo e($user->email); ?>" class="form-control"  placeholder="username - login name " required>
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Login Password</label>
                  <input type="password" name="password" class="form-control"  placeholder="Password - Login Password " >
                </div>






                <div class="form-group">
                  <label for="exampleInputPassword1"> Confirm Login Password</label>
                  <input type="password" name="confirmpassword" class="form-control"  placeholder="Confirm Login Password " >
                </div>


                <div class="form-group">
                <label>Select Type Admin or Supervisor</label>
                <select class="form-control select2" style="width: 100%;" name="check_admin_supervisor" id="check_admin_supervisor" required>
                
                  <option value="admin"  <?php if($user->is_admin): ?> selected <?php endif; ?>>Admin ادمن </option>
                  <option value="supervisor" <?php if($user->is_supervisor ): ?> selected <?php endif; ?>>Supervisor مشرف </option>
                  
                </select>
                </div>


                <div class="form-group">
                <label>Check Permissions  الصلاحيات</label>
                </div>
                
                <div class="form-group col-md-4">
                <label>
                  <input type="checkbox" class="flat-red" id="show" name="show" value="show" <?php if($user->show_ ): ?> checked <?php endif; ?>>
                  Show 
                </label>
                </div>

                <div class="form-group col-md-4">
                <label>
                  <input type="checkbox" class="flat-red" id="create" name="create" value="create" <?php if($user->create_ ): ?> checked <?php endif; ?>>
                  Create 
                </label>
                </div>

                <div class="form-group col-md-4">
                <label>
                  <input type="checkbox" class="flat-red" id="edit" name="edit" value="edit" <?php if($user->edit_ ): ?> checked <?php endif; ?>>
                  Edit 
                </label>
                </div>

                <div class="form-group col-md-4">
                <label>
                  <input type="checkbox" class="flat-red" id="delete" name="delete" value="delete" <?php if($user->delete_ ): ?> checked <?php endif; ?>>
                  Delete 
                </label>
                </div>

                <div class="form-group col-md-4">
                <label>
                  <input type="checkbox" class="flat-red" id="approve" name="approve" value="approve" <?php if($user->approve_ ): ?> checked <?php endif; ?>>
                  approve 
                </label>
                </div>





               <input type="hidden" name="user_id" value="<?php echo e($user->id); ?>" class="form-control"  placeholder="" required>
              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" class="btn btn-success">Save</button>
              </div>
            </form>
          </div>    
</div>
         
      </div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>