@if (isset($errors) && $errors->any() && old('messageForm')=='1')
@foreach($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
@php
$authUser = auth()->check() ? auth()->user() : null;
$isNameCanBeHidden = (!empty($authUser));
$isEmailCanBeHidden = (!empty($authUser) && !empty($authUser->email));
$isPhoneCanBeHidden = (!empty($authUser) && !empty($authUser->phone));
$authFieldValue = data_get($post, 'auth_field', getAuthField());
@endphp
{{-- name --}}
@if ($isNameCanBeHidden)
@else
@php
$fromNameError = (isset($errors) && $errors->has('name')) ? ' is-invalid' : '';
@endphp
@endif
{{-- email --}}
@if ($isEmailCanBeHidden)
@else
@php
$fromEmailError = (isset($errors) && $errors->has('email')) ? ' is-invalid' : '';
@endphp
@endif
{{-- phone --}}
@if ($isPhoneCanBeHidden)
@else
@php
$fromPhoneError = (isset($errors) && $errors->has('phone')) ? ' is-invalid' : '';
$phoneValue = $authUser->phone ?? null;
$phoneCountryValue = $authUser->phone_country ?? config('country.code');
$phoneValue = phoneE164($phoneValue, $phoneCountryValue);
$phoneValueOld = phoneE164(old('phone', $phoneValue), old('phone_country', $phoneCountryValue));
@endphp
@endif
{{-- auth_field --}}
{{-- body --}}
@php
$catType = data_get($post, 'category.parent.type', data_get($post, 'category.type'));
@endphp
@if ($catType == 'job-offer')
{{-- filename --}}
@endif
@include('layouts.inc.tools.captcha', ['label' => true])