2019-11-16 10:21:14 +03:00
|
|
|
@extends('layouts.portal')
|
2017-12-16 16:02:31 +03:00
|
|
|
|
|
|
|
@section('title', trans('general.title.edit', ['type' => trans('auth.profile')]))
|
|
|
|
|
|
|
|
@section('content')
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card">
|
2017-12-16 16:02:31 +03:00
|
|
|
{!! Form::model($user, [
|
2020-01-03 14:39:16 +03:00
|
|
|
'id' => 'profile',
|
2020-02-07 10:52:27 +03:00
|
|
|
'method' => 'PATCH',
|
|
|
|
'route' => ['portal.profile.update', $user->id],
|
2020-01-03 14:39:16 +03:00
|
|
|
'@submit.prevent' => 'onSubmit',
|
|
|
|
'@keydown' => 'form.errors.clear($event.target.name)',
|
|
|
|
'files' => true,
|
2018-09-17 13:57:03 +03:00
|
|
|
'role' => 'form',
|
2020-01-03 14:39:16 +03:00
|
|
|
'class' => 'form-loading-button',
|
|
|
|
'novalidate' => true
|
2017-12-16 16:02:31 +03:00
|
|
|
]) !!}
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
{{ Form::textGroup('name', trans('general.name'), 'user') }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2020-01-11 17:05:10 +03:00
|
|
|
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', [], $user->contact->tax_number) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2020-01-11 17:05:10 +03:00
|
|
|
{{ Form::textGroup('phone', trans('general.phone'), 'phone', [], $user->contact->phone) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2020-01-11 17:05:10 +03:00
|
|
|
{{ Form::textareaGroup('address', trans('general.address'), [], $user->contact->address) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }}
|
2017-12-16 16:02:31 +03:00
|
|
|
|
2021-01-17 12:59:49 +03:00
|
|
|
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</div>
|
2017-12-16 16:02:31 +03:00
|
|
|
</div>
|
|
|
|
|
2020-10-14 17:07:59 +03:00
|
|
|
@canany(['update-portal-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">
|
2020-02-03 14:09:52 +03:00
|
|
|
{{ Form::saveButtons('portal.dashboard') }}
|
2019-11-16 10:21:14 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-14 17:07:59 +03:00
|
|
|
@endcanany
|
2017-12-16 16:02:31 +03:00
|
|
|
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2020-01-03 14:39:16 +03:00
|
|
|
@push('scripts_start')
|
|
|
|
<script src="{{ asset('public/js/portal/profile.js?v=' . version('short')) }}"></script>
|
2017-12-16 16:02:31 +03:00
|
|
|
@endpush
|
|
|
|
|