diff --git a/app/Http/Controllers/Fo/StaticPageController.php b/app/Http/Controllers/Fo/StaticPageController.php index 51f6d8f..db78bd8 100644 --- a/app/Http/Controllers/Fo/StaticPageController.php +++ b/app/Http/Controllers/Fo/StaticPageController.php @@ -5,8 +5,8 @@ namespace App\Http\Controllers\Fo; use App\Enums\StaticPageType; use App\Http\Controllers\Controller; use App\Http\Requests\Fo\ContactRequest; -use App\Mail\SendContactForm; use App\Models\Explorerpage; +use App\Mail\SendContactMail; use App\Models\Homepage; use App\Models\News; use App\Models\Range; @@ -94,7 +94,7 @@ class StaticPageController extends Controller */ public function contactForm(ContactRequest $request): \Illuminate\Http\RedirectResponse { - Mail::to(\config('mail.from.address'))->send(new SendContactForm($request->validated())); + Mail::to(\config('mail.from.address'))->send(new SendContactMail((object)$request->validated())); return redirect()->route('fo.contact.show') ->with( diff --git a/app/Http/Middleware/SecureHeaders.php b/app/Http/Middleware/SecureHeaders.php index 6522fba..a490c4a 100644 --- a/app/Http/Middleware/SecureHeaders.php +++ b/app/Http/Middleware/SecureHeaders.php @@ -90,6 +90,8 @@ class SecureHeaders 'https://www.googletagmanager.com', 'https://cdnjs.cloudflare.com', "$scheme://www.google-analytics.com", + 'https://www.google.com/recaptcha/', + 'https://www.gstatic.com/recaptcha/', // * VITE DEV config('app.debug') ? "https://{$host}:4443" : '', ]) . ';' diff --git a/app/Http/Requests/Fo/ContactRequest.php b/app/Http/Requests/Fo/ContactRequest.php index 76d4f3d..b629eed 100644 --- a/app/Http/Requests/Fo/ContactRequest.php +++ b/app/Http/Requests/Fo/ContactRequest.php @@ -4,6 +4,7 @@ namespace App\Http\Requests\Fo; use App\Enums\Contact\CivilityEnum; use App\Enums\Contact\ObjectEnum; +use App\Lib\Helpers\ToolboxHelper; use App\Traits\Requests\HasPicture; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules\Enum; @@ -12,16 +13,6 @@ class ContactRequest extends FormRequest { use HasPicture; - /** - * Determine if the user is authorized to make this request. - * - * @return boolean - */ - public function authorize(): bool - { - return true; - } - /** * Prepare the data for validation. * @@ -43,6 +34,8 @@ class ContactRequest extends FormRequest */ public function rules() { + ToolboxHelper::validateRecaptcha($this, \config('services.google.recaptcha.version')); + $rules = [ 'civility' => ['sometimes', 'nullable', new Enum(CivilityEnum::class)], 'last_name' => 'sometimes|nullable|string|between:3,255', @@ -53,7 +46,7 @@ class ContactRequest extends FormRequest 'address' => 'sometimes|nullable|string|between:3,255', 'postal_code' => 'sometimes|nullable|numeric|min:0', 'city' => 'sometimes|nullable|string|between:3,255', - 'object' => ['sometimes', 'nullable', new Enum(ObjectEnum::class)], + 'object' => ['required', new Enum(ObjectEnum::class)], 'product_name' => [ 'nullable', 'string', 'between:3,255', // @phpcs:ignore Generic.Files.LineLength.TooLong @@ -144,12 +137,21 @@ class ContactRequest extends FormRequest } } ], - 'message' => 'sometimes|nullable|string|between:3,255', + 'message' => 'required|string|between:3,255', 'accept_rules' => 'required|boolean', 'send_data' => 'required|boolean', ]; - return \array_merge($rules, $this->pictureRules('file', 0, 0, 1920, 1080, true)); + return \array_merge($rules, $this->pictureRules( + 'file', + 0, + 0, + 1920, + 1080, + 3000, + true, + 'product_name,product_date_limit,product_barcode,product_lot,product_date_consumption,product_location' + )); } /** diff --git a/app/Mail/SendContactForm.php b/app/Mail/SendContactForm.php deleted file mode 100644 index 07d00ba..0000000 --- a/app/Mail/SendContactForm.php +++ /dev/null @@ -1,208 +0,0 @@ -civility = (isset($edition['civility'])) ? CivilityEnum::make(intval($edition['civility']))->label() : null; - $this->first_name = $edition['first_name'] ?? null; - $this->last_name = $edition['last_name'] ?? null; - $this->society = $edition['society'] ?? null; - $this->email = $edition['email']; - $this->phone = $edition['phone'] ?? null; - $this->address = $edition['address'] ?? null; - $this->postal_code = $edition['postal_code'] ?? null; - $this->city = $edition['city'] ?? null; - $this->object = (isset($edition['object'])) ? ObjectEnum::make(intval($edition['object']))->label() : null; - $this->product_name = $edition['product_name']; - $this->product_date_limit = $edition['product_date_limit']; - $this->product_barcode = $edition['product_barcode']; - $this->product_lot = $edition['product_lot']; - $this->product_date_consumption = $edition['product_date_consumption']; - $this->product_location = $edition['product_location']; - $this->message = $edition['message'] ?? null; - $this->file = $edition['file'] ?? null; - } - - /** - * Build the message. - * - * @return $this - */ - public function build() - { - $mail = $this->subject(\config('app.name') . ' - contact formulaire') - ->markdown('emails.send-contact-form') - ->with([ - 'civility' => $this->civility, - 'first_name' => $this->first_name, - 'last_name' => $this->last_name, - 'society' => $this->society, - 'email' => $this->email, - 'phone' => $this->phone, - 'address' => $this->address, - 'postal_code' => $this->postal_code, - 'city' => $this->city, - 'object' => $this->object, - 'product_name' => $this->product_name, - 'product_date_limit' => $this->product_date_limit, - 'product_barcode' => $this->product_barcode, - 'product_lot' => $this->product_lot, - 'product_date_consumption' => $this->product_date_consumption, - 'product_location' => $this->product_location, - 'message' => $this->message, - ]); - if (isset($this->file)) { - $mail = $mail->attach($this->file->getRealPath(), [ - 'as' => $this->file->getClientOriginalName(), - 'mime' => $this->file->getClientMimeType(), - ]); - } - return $mail; - } -} diff --git a/app/Mail/SendContactMail.php b/app/Mail/SendContactMail.php new file mode 100644 index 0000000..80ab136 --- /dev/null +++ b/app/Mail/SendContactMail.php @@ -0,0 +1,110 @@ +data = clone $data; + } + + /** + * Get the message envelope. + * + * @return \Illuminate\Mail\Mailables\Envelope + */ + public function envelope(): \Illuminate\Mail\Mailables\Envelope + { + return new Envelope( + from: new Address( + $this->data->email, + ($this->data->first_name !== null || $this->data->last_name !== null) ? + (($this->data->first_name ?? '') . " " . ($this->data->last_name ?? '')) : + null + ), + to: [new Address(config('mail.from.address'), config('mail.from.name'))], + subject: sprintf('%s - %s', ObjectEnum::make($this->data->object)->label() ?? __('Nouveau message'), config('app.name')), + ); + } + + /** + * Get the message content definition. + * + * @return \Illuminate\Mail\Mailables\Content + */ + public function content(): \Illuminate\Mail\Mailables\Content + { + return new Content( + markdown: 'emails.send-contact-form', + with: ['data' => $this->data], + ); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments(): array + { + $attachments = []; + if (isset($this->data->file)) { + $attachments[] = Attachment::fromPath($this->data->file->getRealPath()) + ->as($this->data->file->getClientOriginalName()) + ->withMime($this->data->file->getClientMimeType()); + } + return $attachments; + } +} + +/** + * @property integer $civility + * @property string $last_name + * @property string $first_name + * @property string $society + * @property string $email + * @property string $phone + * @property string $address + * @property string $postal_code + * @property boolean $city + * @property integer $object + * @property string $message + * @property string $product_name + * @property string $product_date_limit + * @property string $product_barcode + * @property string $product_lot + * @property string $product_date_consumption + * @property string $product_location + * @property boolean $accept_rules + * @property boolean $send_data + * @property \Illuminate\Http\UploadedFile $file + * @phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses + */ +class Contact extends \stdClass +{ +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 2814bbf..2cc665b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -26,10 +26,9 @@ class AppServiceProvider extends ServiceProvider App::singleton('clientIp', function () { if (config('app.env') === 'local') { return request()->getClientIp(); - } else { - return request()->server('HTTP_X_FORWARDED_FOR') ?? - request()->getClientIp(); } + return request()->server('HTTP_X_FORWARDED_FOR') ?? + request()->getClientIp(); }); // * LOCAL FORCE eg: for Carbon diff --git a/app/Traits/Requests/HasPicture.php b/app/Traits/Requests/HasPicture.php index 5cc57dd..f79aa60 100644 --- a/app/Traits/Requests/HasPicture.php +++ b/app/Traits/Requests/HasPicture.php @@ -45,7 +45,9 @@ trait HasPicture * @param integer|null $minHeight * @param integer|null $maxWith * @param integer|null $maxHeight + * @param integer|null $size * @param boolean $nullable + * @param string|null $requiredWith * @return array */ public function pictureRules( @@ -54,9 +56,11 @@ trait HasPicture ?int $minHeight = null, ?int $maxWith = null, ?int $maxHeight = null, - bool $nullable = false + ?int $size = null, + bool $nullable = false, + ?string $requiredWith = null, ): array { - $sizes = (object)[ + $dimensions = (object)[ 'minWith' => $minWith ?? $this->minWith, 'minHeight' => $minHeight ?? $this->minHeight, 'maxWith' => $maxWith ?? $this->maxWith, @@ -65,8 +69,10 @@ trait HasPicture return [ $name => [ !$nullable ? 'required' : 'nullable', - function (string $attribute, $value, callable $fail) use ($sizes) { - return ToolboxHelper::validatePicture($attribute, $value, $fail, $sizes); + (strlen($requiredWith)) ? 'required_with:' . $requiredWith : '', + ($size) ? 'max:' . $size : '', + function (string $attribute, $value, callable $fail) use ($dimensions) { + return ToolboxHelper::validatePicture($attribute, $value, $fail, $dimensions); } ] ]; diff --git a/config/services.php b/config/services.php index 88b9614..158e011 100644 --- a/config/services.php +++ b/config/services.php @@ -31,4 +31,11 @@ return [ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], + 'google' => [ + 'recaptcha' => [ + 'public' => env('GOOGLE_RECAPTCHA_PUBLIC'), + 'private' => env('GOOGLE_RECAPTCHA_PRIVATE'), + 'version' => env('GOOGLE_RECAPTCHA_VERSION', "3") === "3" ? true : false + ] + ], ]; diff --git a/package-lock.json b/package-lock.json index 16e7072..811afb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "agis", + "name": "srcs", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/resources/assets/images/global/btn-arrow-dark.png b/resources/assets/images/global/btn-arrow-dark.png new file mode 100644 index 0000000..5b78c2c Binary files /dev/null and b/resources/assets/images/global/btn-arrow-dark.png differ diff --git a/resources/assets/images/global/checkbox-cross.svg b/resources/assets/images/global/checkbox-cross.svg new file mode 100644 index 0000000..d971dd2 --- /dev/null +++ b/resources/assets/images/global/checkbox-cross.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/lang/en/contact.php b/resources/lang/en/contact.php new file mode 100644 index 0000000..507c912 --- /dev/null +++ b/resources/lang/en/contact.php @@ -0,0 +1,12 @@ + "J’autorise AGIS à traiter mes données personnelles " . + "conformément à la :startACharte de confidentialité:endA.", + 'senddata' => "I authorize AGIS to process my personal data in accordance " . + "with the :startA Privacy Policy :endA.", + 'send' => 'Send' +]; diff --git a/resources/lang/fr/contact.php b/resources/lang/fr/contact.php new file mode 100644 index 0000000..e1ae656 --- /dev/null +++ b/resources/lang/fr/contact.php @@ -0,0 +1,12 @@ + "J’autorise AGIS à traiter mes données personnelles " . + "conformément à la :startACharte de confidentialité:endA.", + 'senddata' => "J'ai lu et j'accepte la politique de confidentialité " . + "de ce site: :startA Voir nos mentions légales:endA.", + 'send' => 'Envoyer' +]; diff --git a/resources/sass/fo/base/_common.scss b/resources/sass/fo/base/_common.scss index 9700a58..71839df 100644 --- a/resources/sass/fo/base/_common.scss +++ b/resources/sass/fo/base/_common.scss @@ -6,6 +6,10 @@ img { max-width: 100%; } +.form-check-input[type="checkbox"]:checked { + #{--bs-form-check-bg-image}: url("@/images/global/checkbox-cross.svg"); +} + .bg-agis-yellow { background-image: url('@/images/global/bg-yellow.svg'); background-position: center; diff --git a/resources/sass/fo/pages/_contact.scss b/resources/sass/fo/pages/_contact.scss index af3ef6c..8069632 100644 --- a/resources/sass/fo/pages/_contact.scss +++ b/resources/sass/fo/pages/_contact.scss @@ -18,15 +18,11 @@ } &.active::after { + background: url("@/images/global/btn-arrow-dark.png"); + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; transform: rotate(270deg); } } - - &-products-input { - display: none; - - &.active { - display: flex; - } - } } diff --git a/resources/ts/fo/pages/contact.ts b/resources/ts/fo/pages/contact.ts index 3341a45..23c0d5e 100644 --- a/resources/ts/fo/pages/contact.ts +++ b/resources/ts/fo/pages/contact.ts @@ -1,35 +1,57 @@ document.addEventListener("DOMContentLoaded", function () { - // Select after animation - const selects = document.querySelectorAll(".contact .select-form") as NodeListOf; + const contactPage = document.querySelector("section.contact"); + if (contactPage === null) { + return; + } - document.body.addEventListener("click", function (event) { - const target = event.target as Node | null; - selects.forEach(select => { - if(select.contains(target)){ - selectToggleArrowClass(select); + // * Return string error. + function getErrorString(fieldName: string) { + return `Élement du dom ${fieldName} inexistant.`; + } + + // * Toggle la dropdown Arrow du select. + const contactFormSelectList = contactPage.querySelectorAll("select") as NodeListOf; + document.body.addEventListener("click", function (e: MouseEvent) { + const target = e.target as HTMLElement | null; + contactFormSelectList.forEach(select => { + if (select.contains(target)) { + select.parentElement!.classList.toggle("active"); } else { - selectRemoveArrowClass(select); + select.parentElement!.classList.remove("active"); } }); }); - function selectToggleArrowClass(select: HTMLFieldSetElement) { - select.classList.toggle("active"); + // * Show more input on specific option selected. + const selectObject = contactPage.querySelector("select[name=\"object\"]") as HTMLSelectElement | null; + const contactProductsInput = contactPage.querySelector(".contact-products-input") as HTMLDivElement | null; + if (contactProductsInput === null) { + throw new Error(getErrorString(".contact-products-input")); } - - function selectRemoveArrowClass(select: HTMLFieldSetElement) { - select.classList.remove("active"); + if (selectObject === null) { + throw new Error(getErrorString("select[name=\"object\"]")); } - - // Show more input on specific option selected - const selectObject = document.getElementsByName("object")[0] as unknown as HTMLSelectElement; - selectObject.addEventListener("click", function () { - const contactProductsInput = document.querySelector(".contact-products-input") as HTMLDivElement; + if (Number(selectObject.value) === 1) { + contactProductsInput.classList.remove("d-none"); + } + selectObject.addEventListener("change", () => { if (Number(selectObject.value) === 1) { - contactProductsInput.classList.add("active"); - } - else { - contactProductsInput.classList.remove("active"); + contactProductsInput.classList.remove("d-none"); + } else { + contactProductsInput.classList.add("d-none"); } }); + + // * Get filename. + const inputFile = contactPage.querySelector("input[name=\"file\"]") as HTMLSelectElement | null; + const renderFileName = contactPage.querySelector("#input-file-name") as HTMLParagraphElement | null; + if (inputFile === null) { + throw new Error(getErrorString("input[name=\"file\"]")); + } + if (renderFileName === null) { + throw new Error(getErrorString("#input-file-name")); + } + inputFile.addEventListener("change", function () { + renderFileName.textContent = this.value; + }); }); diff --git a/resources/views/emails/send-contact-form.blade.php b/resources/views/emails/send-contact-form.blade.php index 2129c33..848bc51 100644 --- a/resources/views/emails/send-contact-form.blade.php +++ b/resources/views/emails/send-contact-form.blade.php @@ -1,28 +1,41 @@ @component('mail::message') - # Bonjour, +# Bonjour, - Voici un message depuis le formulaire de contact du site web {{ config('app.name') }} : +## Voici un message envoyé depuis le formulaire de contact du site web {{ config('app.name') }} : - Information sur l'utilisateur: - {{ __('validation.custom.civility') }}: {{ $civility }} - {{ __('validation.attributes.first_name') }}: {{ $first_name }} - {{ __('validation.attributes.last_name') }}: {{ $last_name }} - {{ __('validation.custom.society') }}: {{ $society }} - {{ __('validation.attributes.email') }}: {{ $email }} - {{ __('validation.attributes.password') }}: {{ $phone }} - {{ __('validation.attributes.address') }}: {{ $address }} - {{ __('validation.attributes.postal_code') }}: {{ $postal_code }} - {{ __('validation.attributes.city') }}: {{ $city }} - {{ __('validation.custom.object') }}: {{ $object }} - {{ __('validation.attributes.message') }}: {{ $message }} - - Information sur le produit: - {{ __('validation.custom.product_name') }}: {{ $product_name }} - {{ __('validation.custom.product_date_limit') }}: {{ $product_date_limit }} - {{ __('validation.custom.product_barcode') }}: {{ $product_barcode }} - {{ __('validation.custom.product_lot') }}: {{ $product_lot }} - {{ __('validation.custom.product_date_consumption') }}: {{ $product_date_consumption }} - {{ __('validation.custom.product_location') }}: {{ $product_location }} - - {{ config('app.name') }}. +### Information sur l'utilisateur: +@component('mail::panel') +- **{{ __('validation.custom.civility') }}:** {{ \App\Enums\Contact\CivilityEnum::make($data->civility)->label() ?? '' }} +- **{{ __('validation.attributes.first_name') }}:** {{ $data->first_name ?? '' }} +- **{{ __('validation.attributes.last_name') }}:** {{ $data->last_name ?? '' }} +- **{{ __('validation.custom.society') }}:** {{ $data->society ?? '' }} +- **{{ __('validation.attributes.email') }}:** {{ $data->email }} +- **{{ __('validation.attributes.phone') }}:** {{ $data->phone ?? '' }} +- **{{ __('validation.attributes.address') }}:** {{ $data->address ?? '' }} +- **{{ __('validation.attributes.postal_code') }}:** {{ $data->postal_code ?? '' }} +- **{{ __('validation.attributes.city') }}:** {{ $data->city ?? '' }} +- **{{ __('validation.custom.object') }}:** {{ \App\Enums\Contact\ObjectEnum::make($data->object)->label() }} +- **{{ __('validation.attributes.message') }}:** {{ $data->message }} +@endcomponent + +@if( + $data->product_name !== null || + $data->product_date_limit !== null || + $data->product_barcode !== null || + $data->product_lot !== null || + $data->product_date_consumption !== null || + $data->product_location !== null +) +### Information sur le produit: +@component('mail::panel') +- **{{ __('validation.custom.product_name') }}:** {{ $data->product_name ?? '' }} +- **{{ __('validation.custom.product_date_limit') }}:** {{ $data->product_date_limit ?? '' }} +- **{{ __('validation.custom.product_barcode') }}:** {{ $data->product_barcode ?? '' }} +- **{{ __('validation.custom.product_lot') }}:** {{ $data->product_lot ?? '' }} +- **{{ __('validation.custom.product_date_consumption') }}:** {{ $data->product_date_consumption ?? '' }} +- **{{ __('validation.custom.product_location') }}:** {{ $data->product_location ?? '' }} +@endcomponent +@endif + +L'équipe {{ config('app.name') }} @endcomponent diff --git a/resources/views/fo/pages/contact.blade.php b/resources/views/fo/pages/contact.blade.php index 0c82681..fd10789 100644 --- a/resources/views/fo/pages/contact.blade.php +++ b/resources/views/fo/pages/contact.blade.php @@ -22,10 +22,10 @@ -
+ @method('POST') @csrf -
+

{{ __('validation.custom.civility') }} @foreach (\App\Enums\Contact\CivilityEnum::toArray() as $key => $enumObject) @endforeach @@ -98,11 +98,11 @@

- @foreach (\App\Enums\Contact\ObjectEnum::toArray() as $key => $enumObject) @endforeach @@ -110,7 +110,7 @@
-
+

{{ Str::of(__('pour pouvoir vous répondre nous avons besoin de quelques informations :'))->ucFirst()->value() }}

@@ -171,15 +171,20 @@
-
- + + +

@@ -187,9 +192,9 @@
- +
@@ -197,8 +202,12 @@
@@ -207,19 +216,57 @@
-

{{ __('*Champ obligatoire') }}

+ + + {{ __('cookie-notice.custom.recaptcha.warning') }} + + +
+
+ @if ($errors->has('g-recaptcha-response')) +
+ {{ $errors->first('g-recaptcha-response') }} +
+ @endif +

{{ __('*Champ obligatoire') }}

+
- +
-
-
- -
@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/vendor/cn-cookies.blade.php b/resources/views/vendor/cn-cookies.blade.php index 5278ab4..692ad90 100644 --- a/resources/views/vendor/cn-cookies.blade.php +++ b/resources/views/vendor/cn-cookies.blade.php @@ -4,40 +4,38 @@ $site_name = Str::ucfirst(config('app.name')); $logo_picture_url = Vite::asset('resources/assets/images/layout/logo.svg', 'build'); $logo_alt_text = "Logo {$site_name}"; -// $confidentiality_page_url = route('page.confidentiality'); -// TODO : Changer qd la page existera -$confidentiality_page_url = "#"; +$confidentiality_page_url = route('fo.policies.show'); $strings = (object)[ - 'button_customize_cookies' => __('cookie-notice.button_customize_cookies'), - 'button_forbid' => __('cookie-notice.button_forbid'), - 'button_allow' => __('cookie-notice.button_allow'), - 'button_forbid_all' => Str::upper(__('cookie-notice.button_forbid_all')), - 'button_allow_all' => Str::upper(__('cookie-notice.button_allow_all')), - 'button_customize' => Str::upper(__('cookie-notice.button_customize')), - 'button_back' => Str::upper(__('cookie-notice.button_back')), - 'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]), - 'banner_text_open' => __('cookie-notice.banner_text_open', ['site_name' => $site_name]), - 'banner_text' => __('cookie-notice.banner_text'), - 'banner_details' => __('cookie-notice.banner_details'), - 'banner_details_link' => __('cookie-notice.banner_details_link'), + 'button_customize_cookies' => __('cookie-notice.button_customize_cookies'), + 'button_forbid' => __('cookie-notice.button_forbid'), + 'button_allow' => __('cookie-notice.button_allow'), + 'button_forbid_all' => Str::upper(__('cookie-notice.button_forbid_all')), + 'button_allow_all' => Str::upper(__('cookie-notice.button_allow_all')), + 'button_customize' => Str::upper(__('cookie-notice.button_customize')), + 'button_back' => Str::upper(__('cookie-notice.button_back')), + 'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]), + 'banner_text_open' => __('cookie-notice.banner_text_open', ['site_name' => $site_name]), + 'banner_text' => __('cookie-notice.banner_text'), + 'banner_details' => __('cookie-notice.banner_details'), + 'banner_details_link' => __('cookie-notice.banner_details_link'), 'banner_details_link_title' => __('cookie-notice.banner_details_link_title'), - 'banner_more_details' => __('cookie-notice.banner_more_details'), - 'banner_less_details' => __('cookie-notice.banner_less_details'), - 'Panel_title' => __('cookie-notice.Panel_title'), - 'Panel_subtitle' => __('cookie-notice.Panel_subtitle'), - 'Panel_details' => __('cookie-notice.Panel_details'), + 'banner_more_details' => __('cookie-notice.banner_more_details'), + 'banner_less_details' => __('cookie-notice.banner_less_details'), + 'Panel_title' => __('cookie-notice.Panel_title'), + 'Panel_subtitle' => __('cookie-notice.Panel_subtitle'), + 'Panel_details' => __('cookie-notice.Panel_details'), ]; $cookies = []; // RECAPTCHA $cookies['recaptcha'] = [ - 'name' => __('cookie-notice.custom.recaptcha.title'), - 'description' => __('cookie-notice.custom.recaptcha.description'), - 'link' => 'https://policies.google.com/privacy', - 'labelLink' => __('En savoir +'), - 'cookies' => ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC'] + 'name' => __('cookie-notice.custom.recaptcha.title'), + 'description' => __('cookie-notice.custom.recaptcha.description'), + 'link' => 'https://policies.google.com/privacy', + 'labelLink' => __('En savoir +'), + 'cookies' => ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC'] ]; $cookies['recaptcha']['script'] = <<