Merge pull request #10220 from demarches-simplifiees/fix-drop-down-missing-hint
ETQ usager : Champ choix multiple, ajouter une aide a a la saisie
This commit is contained in:
commit
b245d9b063
5 changed files with 20 additions and 2 deletions
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
en:
|
||||
prompt: "Select"
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fr:
|
||||
prompt: "Sélectionner"
|
|
@ -11,9 +11,9 @@
|
|||
- else
|
||||
%div{ 'data-turbo-focus-group': true }
|
||||
- if @champ.selected_options.present?
|
||||
.fr-mb-2w{ "data-turbo": "true" }
|
||||
.fr-mb-2w.fr-mt-2w{ "data-turbo": "true" }
|
||||
- @champ.selected_options.each do |option|
|
||||
= render NestedForms::OwnedButtonComponent.new(formaction: champs_options_path(@champ.id, option:), http_method: :delete, opt: { aria: {pressed: true }, class: 'fr-tag fr-tag-bug fr-mb-1w fr-mr-1w', id: @champ.checkbox_id(option) }) do
|
||||
= option
|
||||
- if @champ.unselected_options.present?
|
||||
= @form.select :value, @champ.unselected_options, { selected: '', include_blank: '' }, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: 'fr-select fr-mt-2v'
|
||||
= @form.select :value, @champ.unselected_options, { selected: '', include_blank: false, prompt: t('.prompt') }, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: 'fr-select fr-mt-2v'
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
en:
|
||||
activerecord:
|
||||
attributes:
|
||||
champs/multiple_drop_down_list_champ:
|
||||
hints:
|
||||
value: "You can select one or more options."
|
|
@ -0,0 +1,6 @@
|
|||
fr:
|
||||
activerecord:
|
||||
attributes:
|
||||
champs/multiple_drop_down_list_champ:
|
||||
hints:
|
||||
value: "Vous pouvez sélectionner un ou plusieurs choix."
|
Loading…
Add table
Reference in a new issue