Create RNA component

This commit is contained in:
Damien Le Thiec 2022-09-21 15:18:23 +02:00
parent d8afe81034
commit 2141dd501e
5 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,2 @@
class EditableChamp::RNAComponent < EditableChamp::EditableChampBaseComponent
end

View file

@ -0,0 +1,4 @@
---
en:
placeholder: "W503726238"
title: "The RNA number must begin with a capital W followed by 9 digits"

View file

@ -0,0 +1,4 @@
---
fr:
placeholder: "W503726238"
title: "Le numéro RNA doit commencer par un W majuscule suivi de 9 chiffres"

View file

@ -0,0 +1,9 @@
= @form.text_field :value,
id: @champ.input_id,
aria: { describedby: @champ.describedby_id },
placeholder: t(".placeholder"),
required: @champ.mandatory?,
pattern: "W[0-9]{9}",
title: t(".title"),
class: "width-33-desktop",
maxlength: 10

View file

@ -306,9 +306,12 @@ fr:
<< : *default_attributes
procedure:
zone: La démarche est mise en œuvre par
champs:
value: Valeur du champ
errors:
messages:
not_a_phone: 'Numéro de téléphone invalide'
not_a_rna: 'Numéro RNA invalide'
models:
attestation_template:
attributes: