FEATURE #1359: add real edit form to users detail
This commit is contained in:
@@ -16,6 +16,7 @@ return [
|
||||
'noUsers' => 'No users avialable.',
|
||||
'detail' => 'Details of user :name (:email)',
|
||||
'editUser' => 'Editing user :name (:email)',
|
||||
'usersActions' => 'User\'s actions'
|
||||
'usersActions' => 'User\'s actions',
|
||||
'update' => 'Update informations'
|
||||
|
||||
];
|
||||
@@ -0,0 +1,22 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('admin/userManagement.editUser'))
|
||||
|
||||
@section('content')
|
||||
|
||||
<h1>@lang('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email])</h1>
|
||||
|
||||
@if (session('success'))
|
||||
<div class="callout success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div class="callout alert">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('admin.userManagement.editForm', ['roles' => $roles, 'user' => $user])
|
||||
@stop
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
<label>
|
||||
@lang('admin/userManagement.name')
|
||||
<input type="text" placeholder="@lang('admin/userManagement.name')" name="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" placeholder="somebody@example.com">
|
||||
<input type="text" name="email" value="{{$user->email}}" placeholder="somebody@example.com">
|
||||
|
||||
@if (isset($errors) && $errors->has('email'))
|
||||
<div class="callout alert">
|
||||
@@ -36,12 +36,11 @@
|
||||
|
||||
<select name="role">
|
||||
@foreach($roles as $role => $translation)
|
||||
<option value="{{$role}}">@lang($translation)</option>
|
||||
<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') }}
|
||||
@@ -49,6 +48,6 @@
|
||||
@endif
|
||||
|
||||
<label>
|
||||
<button type="submit" class="button success">@lang('admin/userManagement.register')</button>
|
||||
<button type="submit" class="button success">@lang('admin/userManagement.update')</button>
|
||||
</label>
|
||||
</form>
|
||||
Reference in New Issue
Block a user