refactor(drop_down_list_champ): other option
This commit is contained in:
parent
8154daf847
commit
7ebc439630
6 changed files with 24 additions and 30 deletions
|
@ -1,4 +1,4 @@
|
|||
.drop_down_other{ class: champ.other_value_present? ? '' : 'hidden' }
|
||||
.notice
|
||||
%p Veuillez saisir votre autre choix
|
||||
= form.text_field :value_other, { maxlength: "200", placeholder: "Saisissez ici", disabled: !champ.other_value_present? }
|
||||
= form.text_field :value_other, maxlength: "200", placeholder: "Saisissez ici", disabled: !champ.other_value_present?
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
= form.radio_button :value, Champs::DropDownListChamp::OTHER, checked: champ.other_value_present?
|
||||
Autre
|
||||
- else
|
||||
= form.select :value, champ.options, { selected: champ.selected, required: champ.mandatory? }
|
||||
= form.select :value, champ.options, selected: champ.selected, required: champ.mandatory?
|
||||
|
||||
- if champ.drop_down_other?
|
||||
= render partial: "shared/dossiers/drop_down_other_input", locals: { form: form, champ: champ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue