Merge pull request #5644 from tchak/fix-mandatory-linked-champs

Add mandatory * to secondary value
This commit is contained in:
Keirua 2020-09-29 17:49:57 +02:00 committed by GitHub
commit 045501ae50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,10 @@
{ required: champ.mandatory? },
{ data: { secondary_options: champ.secondary_options } }
%span
= form.label :secondary_value, "Valeur secondaire dépendant de la première", class: 'hidden'
= form.label :secondary_value, class: 'hidden' do
Valeur secondaire dépendant de la première
- if champ.mandatory?
%span.mandatory *
= form.select :secondary_value,
champ.secondary_options[champ.primary_value],
{ required: champ.mandatory? },