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:
Michal Kváček
2016-01-24 21:18:27 +01:00
parent bad25cb161
commit 1767872402
6 changed files with 85 additions and 27 deletions
@@ -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')