@if(session()->has('user_updated')) @endif @include('includes.form_errors') @can('read', App\Location::class)
@lang('Location:') @if($user->location) {{$user->location->name}} @else @lang('None') @endif

@endcan {!! Form::model($user, ['method'=>'patch', 'action'=>['ManageUsersController@update', $user->id], 'files'=>true, 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']) !!} @if($user->photo)
@endif
{!! Form::label('name', __('Name:')) !!} {!! Form::text('name', null, ['class'=>'form-control', 'placeholder'=>__('Enter name'), 'required'])!!}
{!! Form::label('username', __('Username:')) !!} {!! Form::text('username', null, ['class'=>'form-control', 'placeholder'=>__('Enter username'), 'required'])!!}
{!! Form::label('email', __('Email:')) !!} {!! Form::email('email', null, ['class'=>'form-control', 'placeholder'=>__('Enter email'), 'required']) !!}
@if($user->id !== 1)
{!! Form::label('role', __('Role:')) !!} {!! Form::select('role', ['0'=>__('None')] + $roles, $user->role_id, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@if(!$user->role)
@endif
{!! Form::label('verified', __('Email Status:')) !!} {!! Form::select('verified', [true=>__('verified'), false=>__('unverified')], $user->verified, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
{!! Form::label('status', __('Status:')) !!} {!! Form::select('status', [0=>__('inactive'), 1=>__('active')], $user->is_active, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@endif @can('update', App\Location::class)
{!! Form::label('location', __('Location:')) !!} {!! Form::select('location', $locations, $user->location_id, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default']) !!}
@endcan
{!! Form::label('password', __('Password:')) !!} {!! Form::password('password', ['class'=>'form-control', 'placeholder'=>__('Enter password')]) !!}
{!! Form::label('password_confirmation', __('Confirm Password:')) !!} {!! Form::password('password_confirmation', ['class'=>'form-control', 'placeholder'=>__('Enter password again')]) !!}
{!! Form::label('photo', __('Choose photo'), ['class'=>'btn btn-default btn-file']) !!} {!! Form::file('photo',['class'=>'form-control', 'style'=>'display: none;','onchange'=>'$("#upload-file-info").html(files[0].name)']) !!} @lang('No photo chosen')
{!! Form::submit(__('Update User'), ['class'=>'btn btn-primary btn-block', 'name'=>'submit_button']) !!}
{!! Form::close() !!}