86 lines
3.8 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.edit', ['type' => trans_choice('general.users', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
2017-09-14 22:21:00 +03:00
{!! Form::model($user, [
2019-11-16 10:21:14 +03:00
'id' => 'user',
2017-09-14 22:21:00 +03:00
'method' => 'PATCH',
2019-11-16 10:21:14 +03:00
'route' => ['users.update', $user->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
2017-09-14 22:21:00 +03:00
'files' => true,
2018-09-17 13:57:03 +03:00
'role' => 'form',
2019-11-16 10:21:14 +03:00
'class' => 'form-loading-button',
'novalidate' => true
2017-09-14 22:21:00 +03:00
]) !!}
2019-11-16 10:21:14 +03:00
<div class="card-body">
<div class="row">
2020-01-21 10:21:20 +03:00
{{ Form::textGroup('name', trans('general.name'), 'font') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }}
2017-09-14 22:21:00 +03:00
2020-07-26 19:47:23 +03:00
{{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $landing_pages, $user->landing_page) }}
2020-01-21 11:59:52 +03:00
2019-11-16 10:21:14 +03:00
@if (setting('default.use_gravatar', '0') == '1')
@stack('picture_input_start')
2020-03-20 11:02:14 +03:00
<div class="form-group col-md-6 disabled">
2019-11-16 10:21:14 +03:00
{!! Form::label('picture', trans_choice('general.pictures', 1), ['class' => 'control-label']) !!}
2020-03-20 11:02:14 +03:00
<div class="input-group input-group-merge">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fa fa-image"></i>
</span>
</div>
{!! Form::text('fake_picture', null, ['id' => 'fake_picture', 'class' => 'form-control', 'disabled' => 'disabled', 'placeholder' => trans('settings.default.use_gravatar')]) !!}
2019-11-16 10:21:14 +03:00
</div>
</div>
@stack('picture_input_end')
@else
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
@endif
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
@permission('read-common-companies')
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }}
2019-11-16 10:21:14 +03:00
@endpermission
2017-10-07 23:52:34 +03:00
2019-11-16 10:21:14 +03:00
@permission('read-auth-roles')
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
@endpermission
2017-09-14 22:21:00 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('enabled', trans('general.enabled'), $user->enabled) }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
2020-06-21 18:48:05 +03:00
@permission(['update-auth-users', 'update-auth-profile'])
2019-11-16 10:21:14 +03:00
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('users.index') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
@endpermission
2017-09-14 22:21:00 +03:00
{!! Form::close() !!}
</div>
@endsection
@push('stylesheet')
<style type="text/css">
.el-select .el-select__tags > span {
display: flex;
margin-bottom: -75px;
}
</style>
@endpush
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/auth/users.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush