57 lines
2.0 KiB
PHP
Raw Normal View History

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, [
'id' => 'profile',
'method' => 'PATCH',
'route' => ['portal.profile.update', $user->id],
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
2018-09-17 13:57:03 +03:00
'role' => 'form',
'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
2019-11-16 10:21:14 +03:00
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
</div>
2017-12-16 16:02:31 +03:00
</div>
2019-11-16 10:21:14 +03:00
@permission(['update-portal-profile'])
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('portal.dashboard') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
2017-12-16 16:02:31 +03:00
@endpermission
{!! Form::close() !!}
</div>
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/portal/profile.js?v=' . version('short')) }}"></script>
2017-12-16 16:02:31 +03:00
@endpush