<?php $__env->startSection('page_title', $user->exists ? __('app.edit_user') : __('app.add_user')); ?>
<?php $__env->startSection('content'); ?>
<form method="POST" action="<?php echo e($user->exists ? route('users.update',$user) : route('users.store')); ?>"><?php echo csrf_field(); ?> <?php if($user->exists): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>
<div class="top-card p-3"><div class="row g-3"><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.name')); ?></label><input name="name" value="<?php echo e(old('name',$user->name)); ?>" class="form-control form-control-lg" required></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.email')); ?></label><input type="email" name="email" value="<?php echo e(old('email',$user->email)); ?>" class="form-control form-control-lg" required></div><div class="col-md-6"><label class="easy-label"><?php echo e(__('app.password')); ?></label><input type="password" name="password" class="form-control form-control-lg" <?php echo e($user->exists?'':'required'); ?>><small class="text-muted"><?php echo e($user->exists ? __('app.leave_blank_password') : ''); ?></small></div><div class="col-md-3"><label class="easy-label"><?php echo e(__('app.role')); ?></label><select name="role_id" class="form-select form-select-lg"><?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option value="<?php echo e($role->id); ?>" <?php if(old('role_id',$user->role_id)==$role->id): echo 'selected'; endif; ?>><?php echo e($role->name); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></select></div><div class="col-md-3"><label class="easy-label"><?php echo e(__('app.role_code')); ?></label><select name="role" class="form-select form-select-lg"><option value="admin" <?php if(old('role',$user->role)==='admin'): echo 'selected'; endif; ?>>admin</option><option value="cashier" <?php if(old('role',$user->role)==='cashier'): echo 'selected'; endif; ?>>cashier</option><option value="stock_officer" <?php if(old('role',$user->role)==='stock_officer'): echo 'selected'; endif; ?>>stock_officer</option><option value="viewer" <?php if(old('role',$user->role)==='viewer'): echo 'selected'; endif; ?>>viewer</option></select></div><div class="col-12"><label><input type="checkbox" name="is_active" value="1" <?php if(old('is_active',$user->is_active)): echo 'checked'; endif; ?>> <?php echo e(__('app.active')); ?></label></div><div class="col-12 text-end"><button class="btn btn-success btn-lg"><?php echo e(__('app.save')); ?></button></div></div></div>
</form>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\petrolmump\resources\views/users/form.blade.php ENDPATH**/ ?>