amelioration(champs.multiple_dropdown_list): passe le champs choix multiple au DSFR, l'encapsule dans un fieldset
This commit is contained in:
parent
b4593a947d
commit
2c04be5289
1 changed files with 7 additions and 9 deletions
|
@ -1,13 +1,11 @@
|
||||||
- if @champ.options?
|
- if @champ.options?
|
||||||
- if @champ.render_as_checkboxes?
|
- if @champ.render_as_checkboxes?
|
||||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend= render EditableChamp::ChampLabelContentComponent.new form: @form, champ: @champ, seen_at: @seen_at
|
- @form.collection_check_boxes :value, @champ.enabled_non_empty_options, :to_s, :to_s do |b|
|
||||||
= @form.collection_check_boxes :value, @champ.enabled_non_empty_options, :to_s, :to_s do |b|
|
.fr-fieldset__element
|
||||||
- tag.div(class: 'editable-champ editable-champ-checkbox') do
|
.fr-checkbox-group
|
||||||
%fieldset.fr-fieldset__element
|
= b.check_box(checked: @champ.selected_options.include?(b.value), aria: { describedby: @champ.describedby_id }, id: @champ.checkbox_id(b.value), class: 'fr-checkbox-group__checkbox')
|
||||||
.fr-checkbox-group
|
%label.fr-label{ for: @champ.checkbox_id(b.value) }
|
||||||
= b.check_box(checked: @champ.selected_options.include?(b.value), aria: { describedby: @champ.describedby_id }, id: @champ.checkbox_id(b.value), class: 'fr-checkbox-group__checkbox')
|
= b.text
|
||||||
%label.fr-label{ for: @champ.checkbox_id(b.value) }
|
|
||||||
= b.text
|
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%div{ 'data-turbo-focus-group': true }
|
%div{ 'data-turbo-focus-group': true }
|
||||||
|
@ -18,4 +16,4 @@
|
||||||
= option
|
= option
|
||||||
%span.tag-dismiss x
|
%span.tag-dismiss x
|
||||||
- if @champ.unselected_options.present?
|
- 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'
|
= @form.select :value, @champ.unselected_options, { selected: '', include_blank: '' }, id: @champ.input_id, aria: { describedby: @champ.describedby_id }, class: 'fr-select fr-mt-2v'
|
||||||
|
|
Loading…
Reference in a new issue