From c08266d81b35ce8c2a84198a72707d11ceee4033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Mon, 10 Jun 2024 13:46:46 +0200 Subject: [PATCH 1/4] Closes #39 --- app/Http/Requests/Fo/ContactRequest.php | 13 ------------- resources/views/fo/pages/contact.blade.php | 22 ++++++---------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/app/Http/Requests/Fo/ContactRequest.php b/app/Http/Requests/Fo/ContactRequest.php index b8be5fef..18eb1f21 100644 --- a/app/Http/Requests/Fo/ContactRequest.php +++ b/app/Http/Requests/Fo/ContactRequest.php @@ -18,18 +18,6 @@ class ContactRequest extends FormRequest return true; } - /** - * Prepare the data for validation. - * - * @return void - */ - public function prepareForValidation(): void - { - $this->merge([ - 'terms' => $this->terms ? true : false - ]); - } - /** * Get the validation rules that apply to the request. * @@ -42,7 +30,6 @@ class ContactRequest extends FormRequest 'last_name' => 'required|min:1', 'email' => 'required|email:rfc,spoof,dns,strict', 'message' => 'required|string|min:10', - 'terms' => 'accepted', // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed 'g-recaptcha-response' => function (string $attribute, mixed $value, \Closure $fail) { try { diff --git a/resources/views/fo/pages/contact.blade.php b/resources/views/fo/pages/contact.blade.php index bc720521..4b3d0e29 100644 --- a/resources/views/fo/pages/contact.blade.php +++ b/resources/views/fo/pages/contact.blade.php @@ -77,23 +77,13 @@
-
- -
+ + {!! __('The information collected from this form is processed by the Data Controller to follow up on your contact request. To know about your rights, you can consult :start the Privacy Policy :end' ,[ + 'start' => '', + 'end' => '' + ]) !!} +
- @if ($errors->has('terms')) -
- {{ $errors->first('terms') }} -
- @endif

*{{ __('Required fields') }}

From 0ba88f51eb6b93baf66439735e783b74a8d7421d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Mon, 10 Jun 2024 13:58:45 +0200 Subject: [PATCH 2/4] Closes #37 --- resources/lang/de.json | 3 ++- .../fo/vendor/cookie-notice/templates/standard.blade.php | 2 +- resources/views/fo/vendor/ldcweb-cookies.blade.php | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/lang/de.json b/resources/lang/de.json index 525f2eaa..ac24f54e 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -275,5 +275,6 @@ "up to date on the latest news around nature & respect.": "die aktuellsten Neuigkeiten und Entwicklungen rund um Nature & Respect.", "You must accept reCaptcha cookies to use the forms.": "Um die Formulare nutzen zu können, müssen Sie reCaptcha-Cookies akzeptieren.", "Accept this cookie to use the forms": "Akzeptieren Sie dieses Cookie, um die Formulare zu verwenden", - "Authorize": "Autorisieren" + "Authorize": "Autorisieren", + "Privacy Policy": "Datenschutzrichtlinie" } diff --git a/resources/views/fo/vendor/cookie-notice/templates/standard.blade.php b/resources/views/fo/vendor/cookie-notice/templates/standard.blade.php index 89c12f92..78b5a09e 100644 --- a/resources/views/fo/vendor/cookie-notice/templates/standard.blade.php +++ b/resources/views/fo/vendor/cookie-notice/templates/standard.blade.php @@ -20,7 +20,7 @@ {!! nl2br(e($strings->banner_title)) !!}
-

{!! clean($strings->banner_text) !!}

+

{!! $strings->banner_text !!}

diff --git a/resources/views/fo/vendor/ldcweb-cookies.blade.php b/resources/views/fo/vendor/ldcweb-cookies.blade.php index fe2cd876..08a16270 100644 --- a/resources/views/fo/vendor/ldcweb-cookies.blade.php +++ b/resources/views/fo/vendor/ldcweb-cookies.blade.php @@ -24,7 +24,11 @@ $strings = (object)[ 'button_allow_all_title' => __('cookie-notice.button_allow_all_title'), 'button_validate_and_close' => Str::upper(__('cookie-notice.button_validate_and_close')), 'banner_title' => __('cookie-notice.banner_title', ['site_name' => $site_name]), - 'banner_text' => __('cookie-notice.banner_text'), + 'banner_text' => sprintf( + "%s

%s", + __('cookie-notice.banner_text'), + "" . __('Privacy Policy') . "" + ), 'panel_title' => __('cookie-notice.panel_title'), 'panel_content' => __('cookie-notice.panel_content'), 'panel_subtitle' => __('cookie-notice.panel_subtitle'), From a77ace0615d1a74a8fbdee13bd647bd4485be063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Mon, 10 Jun 2024 14:00:19 +0200 Subject: [PATCH 3/4] Closes #38 --- resources/sass/fo/partials/_cn-inline-buttons.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/sass/fo/partials/_cn-inline-buttons.scss b/resources/sass/fo/partials/_cn-inline-buttons.scss index 014a0225..bfb784f4 100644 --- a/resources/sass/fo/partials/_cn-inline-buttons.scss +++ b/resources/sass/fo/partials/_cn-inline-buttons.scss @@ -68,6 +68,7 @@ $xmobile: 320px; border-width: 0.1rem; border-radius: 1rem; // * Prevent weird theme override + color: #fff !important; font-size: 0.9rem !important; @include min-width($mobile) { From e1c971ef139560196c991ca0c07dc6251479b0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Mon, 10 Jun 2024 14:57:50 +0200 Subject: [PATCH 4/4] add missing i18n string --- resources/lang/de.json | 3 ++- resources/views/fo/pages/concepts/bloc.blade.php | 2 +- resources/views/fo/partials/model-video.blade.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/lang/de.json b/resources/lang/de.json index ac24f54e..842b95de 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -276,5 +276,6 @@ "You must accept reCaptcha cookies to use the forms.": "Um die Formulare nutzen zu können, müssen Sie reCaptcha-Cookies akzeptieren.", "Accept this cookie to use the forms": "Akzeptieren Sie dieses Cookie, um die Formulare zu verwenden", "Authorize": "Autorisieren", - "Privacy Policy": "Datenschutzrichtlinie" + "Privacy Policy": "Datenschutzrichtlinie", + "You must accept cookies :type to view the videos.": "Um die Videos ansehen zu können, müssen Sie :type-Cookies akzeptieren." } diff --git a/resources/views/fo/pages/concepts/bloc.blade.php b/resources/views/fo/pages/concepts/bloc.blade.php index e1014d35..91c0ea74 100644 --- a/resources/views/fo/pages/concepts/bloc.blade.php +++ b/resources/views/fo/pages/concepts/bloc.blade.php @@ -43,7 +43,7 @@ @include('fo.partials.inline-cookie', [ 'cookie_name' => $player, 'class' => ['d-flex-column'], - 'text_line_1' => __('Vous devez accepter les cookies :type pour visionner les videos.', [ + 'text_line_1' => __('You must accept cookies :type to view the videos.', [ 'type' => $player, ]), ]) diff --git a/resources/views/fo/partials/model-video.blade.php b/resources/views/fo/partials/model-video.blade.php index 38df32ef..37f0367a 100644 --- a/resources/views/fo/partials/model-video.blade.php +++ b/resources/views/fo/partials/model-video.blade.php @@ -21,7 +21,7 @@ @include('front.partials.inline-cookie', [ 'cookie_name' => $type, 'class' => ['d-flex-column'], - 'text_line_1' => __('Vous devez accepter les cookies :type pour visionner les videos.', [ + 'text_line_1' => __('You must accept cookies :type to view the videos.', [ 'type' => $type, ]), ])