272 lines
19 KiB
PHP
272 lines
19 KiB
PHP
@extends('fo.layout')
|
|
|
|
@section('title', $contactModel->seo_title ?? __('Contact'))
|
|
@section('description', $contactModel->seo_description ?? __('Contactez-nous !'))
|
|
@section('breadcrumb',
|
|
request()->route()->getName())
|
|
|
|
@section('content')
|
|
<section class="contact">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<span class="divide d-block w-100 mt-xl-3 my-2"></span>
|
|
<h1 class="f-sheldon text-uppercase my-3 text-center">{{ $contactModel->title }}</h1>
|
|
<span class="divide d-block w-100 mt-xl-3 my-2"></span>
|
|
</div>
|
|
<div class="col-12">
|
|
<p class="text-capitalize m-0 text-center">{{ __('siège social agis') }}</p>
|
|
<p class="text-capitalize m-0 text-center">{{ __('802 rue sainte-geneviève') }}</p>
|
|
<p class="text-capitalize m-0 text-center">{{ __('84000 avignon') }}</p>
|
|
<p class="text-capitalize m-0 text-center">{{ __('t. +33 (0)1 4 90 80 99') }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<form id="contact-form" method="POST" action="{{ route('fo.contact.store') }}" enctype="multipart/form-data">
|
|
@method('POST')
|
|
@csrf
|
|
<div class="bg-agis-yellow mb-md-5 m-0 pb-5">
|
|
<div class="container">
|
|
<div class="position-relative px-md-0 mt-5 px-2 py-5">
|
|
<p
|
|
class="position-absolute start-50 translate-middle f-readex-pro highlight black top-0 m-0 w-fit px-5 text-center text-white">
|
|
{{ __('Formulaire de contact') }}</p>
|
|
<div class="row w-100 mx-auto">
|
|
<div class="col-12 col-md-6 p-0">
|
|
<div class="h-100 me-md-5 position-relative">
|
|
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100">
|
|
<select class="form-control text-capitalize" name="civility" role="button">
|
|
<option class="text-capitalize" disabled selected>{{ __('validation.custom.civility') }}</option>
|
|
@foreach (\App\Enums\Contact\CivilityEnum::toArray() as $key => $enumObject)
|
|
<option class="text-capitalize" value="{{ $enumObject->value }}"
|
|
@if (intval(old('civility')) === $enumObject->value) selected @endif>
|
|
{{ $enumObject->label }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.last_name'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="last_name" value="{{ old('last_name') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.first_name'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="first_name" value="{{ old('first_name') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.custom.society'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="society" value="{{ old('society') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.email'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="email" value="{{ old('email') }}" required>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.phone'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="phone" type="number" value="{{ old('phone') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.address'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="address" value="{{ old('address') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.postal_code'))->ucFirst() }} :</label>
|
|
<input class="form-control" name="postal_code" type="number" value="{{ old('postal_code') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1">{{ Str::of(__('validation.attributes.city'))->ucFirst()->value() }} :</label>
|
|
<input class="form-control" name="city" value="{{ old('city') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<div class="ms-md-5 position-relative pt-md-0 h-100 pt-4">
|
|
<fieldset class="select-form d-flex flex-column justify-content-end align-items-start h-100">
|
|
<select class="form-control text-capitalize" name="object" role="button" required>
|
|
<option class="text-capitalize" disabled selected>{{ __('validation.custom.object') }}</option>
|
|
@foreach (\App\Enums\Contact\ObjectEnum::toArray() as $key => $enumObject)
|
|
<option class="text-capitalize" value="{{ $enumObject->value }}"
|
|
@if (intval(old('object')) === $enumObject->value) selected @endif>
|
|
{{ $enumObject->label }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="contact-products-input row d-none mx-auto p-0">
|
|
<p class="highlight black m-0 mx-auto my-5 w-fit px-5 text-center text-white">
|
|
{{ Str::of(__('pour pouvoir vous répondre nous avons besoin de quelques informations :'))->ucFirst()->value() }}
|
|
</p>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1" for="product_name">
|
|
{{ Str::of(__('validation.custom.product_name'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<input class="form-control" id="product_name" name="product_name" value="{{ old('product_name') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1" for="product_date_limit">
|
|
{{ Str::of(__('validation.custom.product_date_limit'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<input class="form-control" id="product_date_limit" name="product_date_limit"
|
|
value="{{ old('product_date_limit') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1" for="product_barcode">
|
|
{{ Str::of(__('validation.custom.product_barcode'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<input class="form-control" id="product_barcode" name="product_barcode" type="number"
|
|
value="{{ old('product_barcode') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1" for="product_lot">
|
|
{{ Str::of(__('validation.custom.product_lot'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<input class="form-control" id="product_lot" name="product_lot" type="number"
|
|
value="{{ old('product_lot') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start pe-md-5">
|
|
<label class="mt-1" for="product_date_consumption">
|
|
{{ Str::of(__('validation.custom.product_date_consumption'))->ucFirst()->value() }}* :
|
|
<span class="text-body-secondary">{{ __('Ex : 25/08/2028') }}</span>
|
|
</label>
|
|
<input class="form-control" id="product_date_consumption" name="product_date_consumption"
|
|
value="{{ old('product_date_consumption') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 col-md-6 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start ps-md-5">
|
|
<label class="mt-1" for="product_location">
|
|
{{ Str::of(__('validation.custom.product_location'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<input class="form-control" id="product_location" name="product_location"
|
|
value="{{ old('product_location') }}">
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 my-5 p-0">
|
|
<fieldset class="row">
|
|
<div class="col-12 col-md-6 pe-md-5">
|
|
<p class="mb-0 mt-1">
|
|
{{ Str::of(__('souhaitez-vous joindre une photo ?'))->ucFirst()->value() }}
|
|
</p>
|
|
<span class="text-body-secondary">
|
|
{{ Str::of(__('formats acceptés : jpg, png'))->ucFirst()->value() }}
|
|
</span>
|
|
</div>
|
|
<div class="col-12 col-md-6 ps-md-5">
|
|
<label class="btn btn-primary w-100" for="file">
|
|
{{ Str::of(__('ajouter un fichier'))->ucFirst()->value() }}
|
|
</label>
|
|
<input class="d-none" id ="file" name="file" type="file" value="{{ old('file') }}"
|
|
role="button" accept="image/*">
|
|
<p class="m-0" id="input-file-name"></p>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 mb-5 p-0">
|
|
<fieldset class="d-flex flex-column justify-content-center align-items-start">
|
|
<label class="mt-1" for="message">
|
|
{{ Str::of(__('message'))->ucFirst()->value() }}* :
|
|
</label>
|
|
<textarea class="form-control" id="message" name="message" rows="6" required>{{ old('message') }}</textarea>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 mb-1 p-0">
|
|
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row">
|
|
<input class="form-check-input rounded-0 mt-2 p-3" id="accept_rules" name="accept_rules" type="checkbox"
|
|
value="{{ old('accept_rules') }}" role="button" required>
|
|
<label class="ms-2 mt-1" for="accept_rules" role="button">
|
|
{!! nl2br(
|
|
__('contact.acceptcgu', [
|
|
'startA' => '<a href="' . route('fo.policies.show') . '">',
|
|
'endA' => '</a>',
|
|
]),
|
|
) !!}
|
|
</label>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 mb-1 p-0">
|
|
<fieldset class="d-flex justify-content-start align-items-start align-items-md-center flex-row">
|
|
<input class="form-check-input rounded-0 mt-2 p-3" id="send_data" name="send_data" type="checkbox"
|
|
value="{{ old('send_data') }}" role="button" required>
|
|
<label class="ms-2 mt-1" for="send_data" role="button">
|
|
{!! nl2br(
|
|
__('contact.senddata', [
|
|
'startA' => '<a href="' . route('fo.legals.show') . '">',
|
|
'endA' => '</a>',
|
|
]),
|
|
) !!}
|
|
</label>
|
|
</fieldset>
|
|
</div>
|
|
<a class="cn-cookie-link" id="recaptcha-warning" href="" rel="nofollow">
|
|
<strong class="text-underline text-bold text-normal text-danger">
|
|
{{ __('cookie-notice.custom.recaptcha.warning') }}
|
|
</strong>
|
|
</a>
|
|
<div class="d-flex flex-column justify-content-center align-items-center">
|
|
<div id="r_captcha"></div>
|
|
@if ($errors->has('g-recaptcha-response'))
|
|
<div class="mb-6">
|
|
<span class="text-danger">{{ $errors->first('g-recaptcha-response') }}</span>
|
|
</div>
|
|
@endif
|
|
<p>{{ __('*Champ obligatoire') }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button class="g-recaptcha btn btn-primary w-100 text-capitalize"
|
|
data-sitekey="{{ config('services.google.recaptcha.public') }}"
|
|
type="submit">{{ Str::ucfirst(__('contact.send')) }}</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script nonce="{{ $nonce }}">
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
window.__CN_Recaptcha = function() {
|
|
(function(d, t) {
|
|
let g = d.createElement(t),
|
|
s = d.getElementsByTagName(t)[0];
|
|
g.src = 'https://www.google.com/recaptcha/api.js?render=explicit&onload=__CN_Recaptcha_Loaded';
|
|
s.parentNode.insertBefore(g, s)
|
|
}(document, 'script'));
|
|
};
|
|
window.__CN_Recaptcha_Loaded = function() {
|
|
grecaptcha.render('r_captcha', {
|
|
'sitekey': '{{ config('services.google.recaptcha.public') }}'
|
|
});
|
|
document.getElementById('recaptcha-warning').remove();
|
|
document.getElementById('contact-form').inert = false;
|
|
};
|
|
});
|
|
</script>
|
|
@endpush
|