@extends('layouts.app') @section('title') {{ __('messages.user.profile_details') }} @endsection @section('content')
@include('layouts.errors') @include('flash::message')
@csrf @method('PUT')
{!! Form::text('first_name', $user->first_name, [ 'class' => 'form-control', 'placeholder' => __('messages.form.first_name'), 'required', 'id' => 'editProfileFirstName', ]) !!}
{!! Form::text('last_name', $user->last_name, [ 'class' => 'form-control', 'placeholder' => __('messages.form.last_name'), 'required', 'id' => 'editProfileLastName', ]) !!}
{!! Form::email('email', $user->email, [ 'class' => 'form-control', 'placeholder' => __('messages.user.email'), 'required', 'id' => 'isEmailEditProfile', ]) !!}
{{ Form::tel('contact', isset($user) ? (isset($user->region_code) ? '+' . $user->region_code . '' . $user->contact : $user->contact) : null, ['class' => 'form-control', 'placeholder' => __('messages.form.contact'), 'onkeyup' => 'if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,"")', 'id' => 'phoneNumber']) }} {{ Form::hidden('region_code', isset($user) ? $user->region_code : null, ['id' => 'prefix_code']) }} {{ __('messages.placeholder.valid_number') }} Invalid Number
{{ Form::textarea('address', isset($user) && isset($user->address) ? $user->address->address : null, [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.user.address'), 'id' => 'addressField', 'rows' => 3, ]) }}
{{-- City --}}
{{ Form::text('city', isset($user)&& isset($user->address) ? $user->address->city : null, [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.user.city'), 'id' => 'city', ]) }}
{{-- County --}}
{{ Form::text('country', isset($user) && isset($user->address) ? $user->address->country : null, [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.user.country'), 'id' => 'country', ]) }}
{{-- Postal Code --}}
{{ Form::text('postal_code', isset($user) && isset($user->address) ? $user->address->postal_code : null, [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.user.postal_code'), 'id' => 'postal_code', ]) }}
{{-- Identification Number --}}
{{ Form::text('identification_number', isset($user) && isset($user->address) ? $user->address->identification_number : null, [ 'class' => 'form-control', 'required', 'placeholder' => __('messages.user.identification_number'), 'id' => 'identification_number', ]) }}
@endsection