FEATURE #1359: add working user edit
Finally user can be edited in admin. Admin can change password and role of given user.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<form method="POST" action="{{route('users.newPost')}}">
|
||||
<form method="POST" action="{{route('users.editPost', ['id' => $user->id])}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<input type="hidden" value="{{$user->id}}" name="userId" />
|
||||
|
||||
<label>
|
||||
@lang('admin/userManagement.name')
|
||||
<input type="text" placeholder="@lang('admin/userManagement.name')" value="{{$user->name}}" name="name">
|
||||
@@ -20,14 +18,14 @@
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/userManagement.password') <em>(@lang('admin/userManagement.passwordLeaveEmpty'))</em>
|
||||
|
||||
<input type="text" name="password" value="">
|
||||
</label>
|
||||
|
||||
|
||||
@if (\Auth::user()->role == \App\Models\User::ROLE_ADMIN)
|
||||
|
||||
<label>
|
||||
@lang('admin/userManagement.password') <em>(@lang('admin/userManagement.passwordLeaveEmpty'))</em>
|
||||
|
||||
<input type="text" name="password" value="">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/userManagement.roles')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user