65 lines
2.0 KiB
PHP
65 lines
2.0 KiB
PHP
<form method="POST" action="{{route('users.editPost', ['id' => $user->id])}}">
|
|
{!! csrf_field() !!}
|
|
|
|
<label>
|
|
@lang('admin/userManagement.name')
|
|
<input type="text" placeholder="@lang('admin/userManagement.name')" value="{{$user->name}}" name="name">
|
|
</label>
|
|
|
|
<label>
|
|
@lang('admin/userManagement.email')
|
|
|
|
<input type="text" name="email" value="{{$user->email}}" placeholder="somebody@example.com">
|
|
|
|
@if (isset($errors) && $errors->has('email'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('email') }}
|
|
</div>
|
|
@endif
|
|
</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')
|
|
|
|
<select name="role">
|
|
@foreach($roles as $role => $translation)
|
|
<option value="{{$role}}" @if($role == $user->role) selected @endif>@lang($translation)</option>
|
|
@endforeach
|
|
</select>
|
|
</label>
|
|
|
|
@if (isset($errors) && $errors->has('role'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('role') }}
|
|
</div>
|
|
@endif
|
|
|
|
<label>
|
|
@lang('admin/userManagement.status')
|
|
|
|
<select name="status">
|
|
@foreach($states as $status => $translation)
|
|
<option value="{{$status}}" @if($status == $user->status) selected @endif>@lang($translation)</option>
|
|
@endforeach
|
|
</select>
|
|
</label>
|
|
|
|
@if (isset($errors) && $errors->has('role'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('role') }}
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
<label>
|
|
<button type="submit" class="button success">@lang('admin/userManagement.update')</button>
|
|
</label>
|
|
</form> |