fix(champs): save departement info on champ commune

This commit is contained in:
Paul Chavard 2021-11-17 14:52:47 +03:00
parent 333a4029af
commit ae09b37e72
6 changed files with 37 additions and 8 deletions

View file

@ -1,4 +1,6 @@
- hidden_field_id = SecureRandom.uuid
= form.hidden_field :value, { data: { uuid: hidden_field_id } }
= form.hidden_field :external_id, { data: { reference: true } }
= form.hidden_field :departement, { data: { attr: "#{hidden_field_id}:departement" } }
= form.hidden_field :code_departement, { data: { attr: "#{hidden_field_id}:code_departement" } }
= react_component("ComboCommunesSearch", mandatory: champ.mandatory?, hiddenFieldId: hidden_field_id)