style(champ): add default placeholders for text & textarea champs

cc #7429
This commit is contained in:
Colin Darie 2022-07-05 13:47:40 +02:00
parent f4839f0604
commit e26cee8d9d
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
4 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,5 @@
= form.text_field :value, = form.text_field :value,
id: champ.input_id, id: champ.input_id,
placeholder: champ.libelle, placeholder: t(".placeholder"),
required: champ.mandatory?, required: champ.mandatory?,
aria: { describedby: champ.describedby_id } aria: { describedby: champ.describedby_id }

View file

@ -3,4 +3,5 @@
aria: { describedby: champ.describedby_id }, aria: { describedby: champ.describedby_id },
rows: 6, rows: 6,
required: champ.mandatory?, required: champ.mandatory?,
value: html_to_string(champ.value) value: html_to_string(champ.value),
placeholder: t(".placeholder")

View file

@ -27,6 +27,10 @@ en:
siret: siret:
placeholder: "50000123456789" placeholder: "50000123456789"
title: "The SIRET number must have exactly 14 digits" title: "The SIRET number must have exactly 14 digits"
text:
placeholder: "Your answer"
textarea:
placeholder: "Write your answer here"
header: header:
expires_at: expires_at:
brouillon: "Expires on %{date} (%{duree_conservation_totale} months after this file was created)" brouillon: "Expires on %{date} (%{duree_conservation_totale} months after this file was created)"

View file

@ -27,6 +27,10 @@ fr:
siret: siret:
placeholder: "50000123456789" placeholder: "50000123456789"
title: "Le numéro de SIRET doit comporter exactement 14 chiffres" title: "Le numéro de SIRET doit comporter exactement 14 chiffres"
text:
placeholder: "Votre réponse"
textarea:
placeholder: "Rédigez ici votre réponse"
header: header:
expires_at: expires_at:
brouillon: "Expirera le %{date} (%{duree_conservation_totale} mois après la création du dossier)" brouillon: "Expirera le %{date} (%{duree_conservation_totale} mois après la création du dossier)"