From 54752d5d05048ed492997dbd171d03db535992c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Thu, 25 Jun 2026 16:53:47 +0200 Subject: [PATCH] fix(translations): correct formatting in employee number message style(forms): remove asterisk from required labels in various forms --- lang/fr.json | 2 +- resources/sass/bo/base/_common.scss | 5 ++ resources/sass/fo/base/_common.scss | 7 ++ resources/views/bo/faqs/form.blade.php | 2 +- resources/views/bo/pages/form.blade.php | 6 +- .../views/bo/pickup-exceptions/form.blade.php | 7 +- .../views/bo/product-incos/form.blade.php | 2 +- resources/views/bo/products/form.blade.php | 64 ++++++++++++++++--- resources/views/bo/ranges/form.blade.php | 4 +- resources/views/bo/slides/form.blade.php | 2 +- resources/views/bo/tags/form.blade.php | 2 +- resources/views/fo/auth/register.blade.php | 7 +- 12 files changed, 84 insertions(+), 26 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index 28634407..81fb6cea 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -442,7 +442,7 @@ "Please confirm your password before continuing.": "Veuillez confirmer votre mot de passe avant de continuer.", "Please contact your HR department for your access code": "Merci de vous rapprocher de votre service RH pour connaître votre code d'accès", "Please enter a period to view statistics": "Veuillez renseigner une période afin de visualiser les statistiques", - "Please enter your employee number (available on your payslip), 7 characters long (e.g. v00115590 --> 0115590).": "Merci de renseigner votre matricule (disponible sur votre bulletin de salaire), sur 7 caractères (ex : v00115590 -->0115590).", + "Please enter your employee number (available on your payslip), 7 characters long (e.g. v00115590->0115590).": "Merci de renseigner votre matricule (disponible sur votre bulletin de salaire), sur 7 caractères (ex : v00115590->0115590).", "Please note: The scheduled postponement is a one-time event and will not repeat automatically.": "Attention : le report configuré est ponctuel et ne se répétera pas automatiquement.", "postal": "Code postal", "Postal address": "Adresse postale", diff --git a/resources/sass/bo/base/_common.scss b/resources/sass/bo/base/_common.scss index a98bd475..1ef8db24 100644 --- a/resources/sass/bo/base/_common.scss +++ b/resources/sass/bo/base/_common.scss @@ -61,3 +61,8 @@ .select-none { user-select: none; } + +.form-group:has([required]) > label::after { + color: var(--bs-danger); + content: ' *'; +} diff --git a/resources/sass/fo/base/_common.scss b/resources/sass/fo/base/_common.scss index 63833767..360bc43e 100644 --- a/resources/sass/fo/base/_common.scss +++ b/resources/sass/fo/base/_common.scss @@ -162,3 +162,10 @@ .bottom-n15px { bottom: -15px !important; } + +.form-floating > .form-control[required] ~ label::after, +.form-floating > .form-select[required] ~ label::after, +.form-check:has([required]) > label::after { + color: var(--bs-danger); + content: ' *'; +} diff --git a/resources/views/bo/faqs/form.blade.php b/resources/views/bo/faqs/form.blade.php index 5c238999..1bf2879a 100644 --- a/resources/views/bo/faqs/form.blade.php +++ b/resources/views/bo/faqs/form.blade.php @@ -4,7 +4,7 @@
- +
'faq-question'])'>
diff --git a/resources/views/bo/pages/form.blade.php b/resources/views/bo/pages/form.blade.php index 1f8d7832..2fa025f9 100644 --- a/resources/views/bo/pages/form.blade.php +++ b/resources/views/bo/pages/form.blade.php @@ -13,7 +13,7 @@
'page-seo_title'])'>
+ placeholder="{{ Str::ucfirst(__('validation.custom.attributes.seo_title')) }}" required> @include('bo.modules.input-error', [ 'inputName' => 'seo_title', 'helperId' => 'page-seo_title-help', @@ -32,7 +32,7 @@
'page-seo_description'])'>
+ placeholder="{{ Str::ucfirst(__('validation.custom.attributes.seo_description')) }}" required> @include('bo.modules.input-error', [ 'inputName' => 'seo_description', 'helperId' => 'page-seo_description-help', @@ -67,7 +67,7 @@
- + @include('bo.modules.input-error', [ 'inputName' => 'content', 'helper' => __('Complete content of the page.'), diff --git a/resources/views/bo/pickup-exceptions/form.blade.php b/resources/views/bo/pickup-exceptions/form.blade.php index f383cc4f..099501a9 100644 --- a/resources/views/bo/pickup-exceptions/form.blade.php +++ b/resources/views/bo/pickup-exceptions/form.blade.php @@ -5,7 +5,7 @@
- + @@ -18,7 +18,7 @@
+ for="exception-label">{{ Str::ucfirst(__('validation.custom.attributes.label')) ?? __('Label') }}
'exception-label'])'>
- diff --git a/resources/views/bo/product-incos/form.blade.php b/resources/views/bo/product-incos/form.blade.php index 6d2aeeb4..6eb49d69 100644 --- a/resources/views/bo/product-incos/form.blade.php +++ b/resources/views/bo/product-incos/form.blade.php @@ -7,7 +7,7 @@ @if (!request()->routeIs('bo.products.incos.create')) {{-- NO ART --}}
- + @include('bo.modules.input-error', ['inputName' => 'no_art']) diff --git a/resources/views/bo/products/form.blade.php b/resources/views/bo/products/form.blade.php index 7b8460d3..a991fee8 100644 --- a/resources/views/bo/products/form.blade.php +++ b/resources/views/bo/products/form.blade.php @@ -4,7 +4,7 @@ {{ __('General Information') }}
- +
'product-name'])'>
@@ -17,12 +17,12 @@
- @@ -89,7 +89,7 @@
+ for="product-short-description">{{ Str::ucfirst(__('validation.custom.attributes.short_description')) }}
'product-short-description'])'>
{{ Str::ucfirst(__('validation.custom.attributes.picture_alt')) }} - @include('bo.modules.input-error', ['inputName' => 'picture_alt']) + @include('bo.modules.input-error', [ + 'inputName' => 'picture_alt', + 'helperId' => 'product-picture-alt-help', + 'helper' => __('validation.between.string', [ + 'attribute' => __(':field :inter:model', [ + 'field' => __('validation.custom.attributes.picture_alt'), + 'inter' => __('validation.custom.of_the.male'), + 'model' => trans_choice('models.classes.products', 1), + ]), + 'min' => 4, + 'max' => 75, + ]), + ])
- @include('bo.modules.input-error', ['inputName' => 'picture_title']) + @include('bo.modules.input-error', [ + 'inputName' => 'picture_title', + 'helperId' => 'product-picture-title-help', + 'helper' => __('validation.between.string', [ + 'attribute' => __(':field :inter:model', [ + 'field' => __('validation.custom.attributes.picture_title'), + 'inter' => __('validation.custom.of_the.male'), + 'model' => trans_choice('models.classes.products', 1), + ]), + 'min' => 4, + 'max' => 75, + ]), + ])
@@ -180,14 +204,38 @@ for="picture-large-alt">{{ Str::ucfirst(__('validation.custom.attributes.picture_large_alt')) }} - @include('bo.modules.input-error', ['inputName' => 'picture_large_alt']) + @include('bo.modules.input-error', [ + 'inputName' => 'picture_large_alt', + 'helperId' => 'product-picture-large-alt-help', + 'helper' => __('validation.between.string', [ + 'attribute' => __(':field :inter:model', [ + 'field' => __('validation.custom.attributes.picture_large_alt'), + 'inter' => __('validation.custom.of_the.male'), + 'model' => trans_choice('models.classes.products', 1), + ]), + 'min' => 4, + 'max' => 75, + ]), + ])
- @include('bo.modules.input-error', ['inputName' => 'picture_large_title']) + @include('bo.modules.input-error', [ + 'inputName' => 'picture_large_title', + 'helperId' => 'product-picture-large-title-help', + 'helper' => __('validation.between.string', [ + 'attribute' => __(':field :inter:model', [ + 'field' => __('validation.custom.attributes.picture_large_title'), + 'inter' => __('validation.custom.of_the.male'), + 'model' => trans_choice('models.classes.products', 1), + ]), + 'min' => 4, + 'max' => 75, + ]), + ])
diff --git a/resources/views/bo/ranges/form.blade.php b/resources/views/bo/ranges/form.blade.php index b1902a0f..1f737105 100644 --- a/resources/views/bo/ranges/form.blade.php +++ b/resources/views/bo/ranges/form.blade.php @@ -5,7 +5,7 @@
- +
'range-name'])'>
@@ -38,7 +38,7 @@
- + @include('bo.modules.input-error', [ 'inputName' => 'description', 'helper' => __('Complete content of the range.'), diff --git a/resources/views/bo/slides/form.blade.php b/resources/views/bo/slides/form.blade.php index 553b53ef..7aa1bdad 100644 --- a/resources/views/bo/slides/form.blade.php +++ b/resources/views/bo/slides/form.blade.php @@ -5,7 +5,7 @@
- +
'slide-title'])'>
diff --git a/resources/views/bo/tags/form.blade.php b/resources/views/bo/tags/form.blade.php index 463f509a..070e5ef9 100644 --- a/resources/views/bo/tags/form.blade.php +++ b/resources/views/bo/tags/form.blade.php @@ -5,7 +5,7 @@
- +
'slide-label'])'>
diff --git a/resources/views/fo/auth/register.blade.php b/resources/views/fo/auth/register.blade.php index e5cd5819..3a3f3859 100644 --- a/resources/views/fo/auth/register.blade.php +++ b/resources/views/fo/auth/register.blade.php @@ -26,7 +26,7 @@ {{-- CONSIGNES MATRICULE --}} {{-- MATRICULE --}} @@ -100,7 +100,7 @@
+ value="{{ old('phone') }}" placeholder="{{ __('validation.attributes.phone') }}" autocomplete="tel">
@error('phone') @@ -122,8 +122,7 @@ {{-- COORDONNÉES POSTALES --}}
+ value="{{ old('address') }}" placeholder="{{ __('validation.attributes.address') }}" autocomplete="street-address"> @error('address') {{ $message }}