@extends('layouts.app') @section('title', __('lang_v1.my_profile')) @section('content')

@lang('lang_v1.my_profile')

{!! Form::open(['url' => action([\App\Http\Controllers\UserController::class, 'updatePassword']), 'method' => 'post', 'id' => 'edit_password_form', 'class' => 'form-horizontal' ]) !!}

@lang('user.change_password')

{!! Form::label('current_password', __('user.current_password') . ':', ['class' => 'col-sm-3 control-label']) !!}
{!! Form::password('current_password', ['class' => 'form-control','placeholder' => __('user.current_password'), 'required']); !!}
{!! Form::label('new_password', __('user.new_password') . ':', ['class' => 'col-sm-3 control-label']) !!}
{!! Form::password('new_password', ['class' => 'form-control','placeholder' => __('user.new_password'), 'required']); !!}
{!! Form::label('confirm_password', __('user.confirm_new_password') . ':', ['class' => 'col-sm-3 control-label']) !!}
{!! Form::password('confirm_password', ['class' => 'form-control','placeholder' => __('user.confirm_new_password'), 'required']); !!}
{!! Form::close() !!} {!! Form::open(['url' => action([\App\Http\Controllers\UserController::class, 'updateProfile']), 'method' => 'post', 'id' => 'edit_user_profile_form', 'files' => true ]) !!}

@lang('user.edit_profile')

{!! Form::label('surname', __('business.prefix') . ':') !!}
{!! Form::text('surname', $user->surname, ['class' => 'form-control','placeholder' => __('business.prefix_placeholder')]); !!}
{!! Form::label('first_name', __('business.first_name') . ':') !!}
{!! Form::text('first_name', $user->first_name, ['class' => 'form-control','placeholder' => __('business.first_name'), 'required']); !!}
{!! Form::label('last_name', __('business.last_name') . ':') !!}
{!! Form::text('last_name', $user->last_name, ['class' => 'form-control','placeholder' => __('business.last_name')]); !!}
{!! Form::label('email', __('business.email') . ':') !!}
{!! Form::email('email', $user->email, ['class' => 'form-control','placeholder' => __('business.email') ]); !!}
{!! Form::label('language', __('business.language') . ':') !!}
{!! Form::select('language',$languages, $user->language, ['class' => 'form-control select2']); !!}
@component('components.widget', ['title' => __('lang_v1.profile_photo')]) @if(!empty($user->media))
{!! $user->media->thumbnail([150, 150], 'img-circle') !!}
@endif
{!! Form::label('profile_photo', __('lang_v1.upload_image') . ':') !!} {!! Form::file('profile_photo', ['id' => 'profile_photo', 'accept' => 'image/*']); !!}

@lang('purchase.max_file_size', ['size' => (config('constants.document_size_limit') / 1000000)])

@endcomponent
@include('user.edit_profile_form_part', ['bank_details' => !empty($user->bank_details) ? json_decode($user->bank_details, true) : null])
{!! Form::close() !!}
@endsection