2016-10-03 14:11:24 +01:00
|
|
|
@extends('themes.base.layout')
|
|
|
|
@section('title', trans('admin.edit_user_title', ['name' => $user->name]))
|
|
|
|
|
|
|
|
@section('breadcrumb')
|
|
|
|
<div class="breadcrumb">
|
|
|
|
<div class="container">
|
|
|
|
<ol class="breadcrumb">
|
2017-02-13 10:36:53 +00:00
|
|
|
<li><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
|
2016-10-03 14:11:24 +01:00
|
|
|
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
2017-02-13 10:36:53 +00:00
|
|
|
<li><a href="{{ route('users.index') }}">@lang('navigation.breadcrumb.users')</a></li>
|
2016-10-03 14:11:24 +01:00
|
|
|
<li class="active">@lang('navigation.breadcrumb.edit_user')</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<h1>@yield('title')</h1>
|
|
|
|
<p>@lang('admin.edit_user_intro')</p>
|
|
|
|
<hr/>
|
|
|
|
|
2017-02-13 10:36:53 +00:00
|
|
|
{!! Form::model($user, ['route' => ['users.update', $user->id], 'method' => 'PUT']) !!}
|
2017-02-14 11:03:58 +00:00
|
|
|
<div>
|
|
|
|
{{-- Nav tabs --}}
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2017-02-17 11:38:10 +00:00
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'details', 'tab_name' => 'details', 'tab_icon' => 'info-circle', 'tab_text' => trans('admin.user_details_tab')])
|
|
|
|
@include(Theme::viewName('partials.tab'), ['active_tab' => 'details', 'tab_name' => 'groups', 'tab_icon' => 'users', 'tab_text' => trans('admin.user_groups_tab')])
|
2017-02-14 11:03:58 +00:00
|
|
|
</ul>
|
2016-10-03 14:11:24 +01:00
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
{{-- Tab panes --}}
|
|
|
|
<div class="tab-content">
|
|
|
|
{{-- Details --}}
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="details-tab">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
|
|
|
{!! Form::label('name', trans('forms.name_label'), ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('name', old('name'), ['class' => 'form-control']) !!}
|
2016-10-28 14:05:53 +01:00
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
@if ($errors->has('name'))
|
|
|
|
<span class="help-block">
|
|
|
|
<strong>{{ $errors->first('name') }}</strong>
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
|
|
|
{!! Form::label('email', trans('forms.email_label'), ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::text('email', old('email'), ['class' => 'form-control']) !!}
|
|
|
|
|
|
|
|
@if ($errors->has('email'))
|
|
|
|
<span class="help-block">
|
|
|
|
<strong>{{ $errors->first('email') }}</strong>
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-03 14:11:24 +01:00
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
|
|
|
{!! Form::label('password', trans('forms.password_label'), ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::password('password', ['class' => 'form-control']) !!}
|
2016-10-28 14:05:53 +01:00
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
@if ($errors->has('password'))
|
|
|
|
<span class="help-block">
|
|
|
|
<strong>{{ $errors->first('password') }}</strong>
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
|
|
|
{!! Form::label('password_confirmation', trans('forms.password_confirm_label'), ['class' => 'control-label']) !!}
|
|
|
|
{!! Form::password('password_confirmation', ['class' => 'form-control']) !!}
|
|
|
|
|
|
|
|
@if ($errors->has('password_confirmation'))
|
|
|
|
<span class="help-block">
|
|
|
|
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="is_admin"@if ($user->is_admin) checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.admin_user_label')</strong>
|
2017-03-21 21:48:55 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="can_create_albums"@if ($user->can_create_albums) checked="checked"@endif>
|
|
|
|
<strong>@lang('forms.can_create_albums_label')</strong>
|
2017-02-14 11:03:58 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (!$user->is_activated)
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="is_activated">
|
|
|
|
<strong>@lang('forms.activate_user_label')</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
2016-10-28 14:05:53 +01:00
|
|
|
@endif
|
2016-10-03 14:11:24 +01:00
|
|
|
</div>
|
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
{{-- Groups --}}
|
|
|
|
<div role="tabpanel" class="tab-pane" id="groups-tab">
|
|
|
|
@if ($groups->count() > 0)
|
|
|
|
<p style="margin-bottom: 20px;">@lang('admin.user_groups_list_select', ['name' => $user->name])</p>
|
2016-10-28 14:05:53 +01:00
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
@foreach ($groups as $group)
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="user_group_id[]" value="{{ $group->id }}"@if (in_array($group->id, $users_groups)) checked="checked"@endif>
|
|
|
|
<strong>{{ $group->name }}</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
@else
|
2016-10-28 14:05:53 +01:00
|
|
|
@endif
|
2016-10-03 14:11:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-02-14 11:03:58 +00:00
|
|
|
<div class="form-actions" style="margin-top: 20px;">
|
|
|
|
<a href="{{ route('users.index') }}" class="btn btn-default">@lang('forms.cancel_action')</a>
|
2017-02-15 09:14:52 +00:00
|
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.save_action')</button>
|
2016-10-03 14:11:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|