From 168616b8c64dad1ea6c0bc464c200bee2fc266aa Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Mon, 25 Sep 2023 16:59:34 +0200 Subject: [PATCH] remove placeholder for phone component --- .../editable_champ/phone_component/phone_component.en.yml | 3 --- .../editable_champ/phone_component/phone_component.fr.yml | 3 --- .../editable_champ/phone_component/phone_component.html.haml | 2 +- config/locales/models/champs/phone_champ/en.yml | 2 +- config/locales/models/champs/phone_champ/fr.yml | 2 +- 5 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 app/components/editable_champ/phone_component/phone_component.en.yml delete mode 100644 app/components/editable_champ/phone_component/phone_component.fr.yml diff --git a/app/components/editable_champ/phone_component/phone_component.en.yml b/app/components/editable_champ/phone_component/phone_component.en.yml deleted file mode 100644 index d16bb25d2..000000000 --- a/app/components/editable_champ/phone_component/phone_component.en.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -en: - placeholder: "0612345678" diff --git a/app/components/editable_champ/phone_component/phone_component.fr.yml b/app/components/editable_champ/phone_component/phone_component.fr.yml deleted file mode 100644 index 6c86da5ab..000000000 --- a/app/components/editable_champ/phone_component/phone_component.fr.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -fr: - placeholder: "0612345678" diff --git a/app/components/editable_champ/phone_component/phone_component.html.haml b/app/components/editable_champ/phone_component/phone_component.html.haml index d9b079783..79ffaca84 100644 --- a/app/components/editable_champ/phone_component/phone_component.html.haml +++ b/app/components/editable_champ/phone_component/phone_component.html.haml @@ -1,4 +1,4 @@ -# Allowed @formats: -# very light validation is made client-side -# stronger validation is made server-side -= @form.phone_field(:value, input_opts(id: @champ.input_id, aria: { describedby: @champ.describedby_id }, placeholder: t(".placeholder"), required: @champ.required?, pattern: "[^a-z^A-Z]+")) += @form.phone_field(:value, input_opts(id: @champ.input_id, aria: { describedby: @champ.describedby_id }, required: @champ.required?, pattern: "[^a-z^A-Z]+")) diff --git a/config/locales/models/champs/phone_champ/en.yml b/config/locales/models/champs/phone_champ/en.yml index e12f59e2a..c475c4f94 100644 --- a/config/locales/models/champs/phone_champ/en.yml +++ b/config/locales/models/champs/phone_champ/en.yml @@ -3,4 +3,4 @@ en: attributes: champs/phone_champ: hints: - value: "Phone number must be valid" + value: "Phone number must be valid. Example : 0612345678" diff --git a/config/locales/models/champs/phone_champ/fr.yml b/config/locales/models/champs/phone_champ/fr.yml index 55d6a93d6..9cfda3470 100644 --- a/config/locales/models/champs/phone_champ/fr.yml +++ b/config/locales/models/champs/phone_champ/fr.yml @@ -3,4 +3,4 @@ fr: attributes: champs/phone_champ: hints: - value: "Le numéro de téléphone saisi doit être valide" + value: "Le numéro de téléphone saisi doit être valide. Exemple : 0612345678"