From cab3a55f4567abe15a74689d4533ed71c484327a Mon Sep 17 00:00:00 2001 From: mfo Date: Thu, 11 Apr 2024 09:47:28 +0200 Subject: [PATCH] fix(Champ.dossier_link): do not use placeholder, use hint --- .../dossier_link_component/dossier_link_component.html.haml | 2 +- config/locales/models/champs/dossier_link_champ/en.yml | 6 ++++++ config/locales/models/champs/dossier_link_champ/fr.yml | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 config/locales/models/champs/dossier_link_champ/en.yml create mode 100644 config/locales/models/champs/dossier_link_champ/fr.yml diff --git a/app/components/editable_champ/dossier_link_component/dossier_link_component.html.haml b/app/components/editable_champ/dossier_link_component/dossier_link_component.html.haml index 2db3bd805..5389f084d 100644 --- a/app/components/editable_champ/dossier_link_component/dossier_link_component.html.haml +++ b/app/components/editable_champ/dossier_link_component/dossier_link_component.html.haml @@ -1,4 +1,4 @@ -= @form.text_field(:value, input_opts(id: @champ.input_id, aria: { describedby: @champ.describedby_id }, inputmode: :numeric, min: 1, pattern: "[0-9]{1,12}", placeholder: "Numéro de dossier", autocomplete: 'off', required: @champ.required?, class: "width-33-desktop #{@champ.blank? ? '' : 'small-margin'}")) += @form.text_field(:value, input_opts(id: @champ.input_id, aria: { describedby: @champ.describedby_id }, inputmode: :numeric, min: 1, pattern: "[0-9]{1,12}", autocomplete: 'off', required: @champ.required?, class: "width-33-desktop #{@champ.blank? ? '' : 'small-margin'}")) - if !@champ.blank? - if dossier.blank? diff --git a/config/locales/models/champs/dossier_link_champ/en.yml b/config/locales/models/champs/dossier_link_champ/en.yml new file mode 100644 index 000000000..c2968da61 --- /dev/null +++ b/config/locales/models/champs/dossier_link_champ/en.yml @@ -0,0 +1,6 @@ +en: + activerecord: + attributes: + champs/dossier_link_champ: + hints: + value: "File number" diff --git a/config/locales/models/champs/dossier_link_champ/fr.yml b/config/locales/models/champs/dossier_link_champ/fr.yml new file mode 100644 index 000000000..b757afa74 --- /dev/null +++ b/config/locales/models/champs/dossier_link_champ/fr.yml @@ -0,0 +1,6 @@ +fr: + activerecord: + attributes: + champs/dossier_link_champ: + hints: + value: "Numéro de dossier"