@extends('layouts.admin') @section('title', trans('general.title.edit', ['type' => trans_choice('general.users', 1)])) @section('content')
{!! Form::model($user, [ 'id' => 'user', 'method' => 'PATCH', 'route' => ['users.update', $user->id], '@submit.prevent' => 'onSubmit', '@keydown' => 'form.errors.clear($event.target.name)', 'files' => true, 'role' => 'form', 'class' => 'form-loading-button', 'novalidate' => true ]) !!}
{{ Form::textGroup('name', trans('general.name'), 'font') }} {{ Form::emailGroup('email', trans('general.email'), 'envelope') }} {{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }} {{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }} {{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }} {{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $landing_pages, $user->landing_page) }} @if (setting('default.use_gravatar', '0') == '1') @stack('picture_input_start')
{!! Form::label('picture', trans_choice('general.pictures', 1), ['class' => 'control-label']) !!}
{!! Form::text('fake_picture', null, ['id' => 'fake_picture', 'class' => 'form-control', 'disabled' => 'disabled', 'placeholder' => trans('settings.default.use_gravatar')]) !!}
@stack('picture_input_end') @else {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} @endif @can('read-common-companies') {{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'disabled' => (in_array('customer', $user->roles()->pluck('name')->toArray())) ? 'true' : 'false', 'remote_action' => route('companies.index')]) }} @endcan @can('read-auth-roles') {{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }} @endcan {{ Form::radioGroup('enabled', trans('general.enabled'), $user->enabled) }}
@canany(['update-auth-users', 'update-auth-profile']) @endcanany {!! Form::close() !!}
@endsection @push('stylesheet') @endpush @push('scripts_start') @endpush