fix(Champ.checkbox): single checkbox should not be wrapped in fieldset
. single checkbox uses fr-checkbox
not fr-radio
Co-authored-by: Corinne Durrmeyer <corinne@inseo.fr>
This commit is contained in:
parent
64dcd2b0d2
commit
91f07f86e4
5 changed files with 20 additions and 26 deletions
|
@ -1,9 +1,5 @@
|
|||
class EditableChamp::CheckboxComponent < EditableChamp::EditableChampBaseComponent
|
||||
def dsfr_champ_container
|
||||
:fieldset
|
||||
end
|
||||
|
||||
def dsfr_input_classname
|
||||
'fr-radio'
|
||||
'fr-checkbox'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
.fr-fieldset__element
|
||||
.fr-checkbox-group
|
||||
= @form.check_box :value,
|
||||
{ required: @champ.required?, id: @champ.input_id, checked: @champ.true?, aria: { describedby: @champ.describedby_id }, class: class_names('required' => @champ.required?)},
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
= fields_for champ.input_name, champ do |form|
|
||||
= render EditableChamp::EditableChampComponent.new form:, champ:
|
||||
- else
|
||||
.fr-fieldset__element.fr-my-0
|
||||
- if header_section
|
||||
.fr-fieldset__legend.fr-my-0{ class: "reset-#{tag_for_depth}" }
|
||||
= render EditableChamp::HeaderSectionComponent.new(champ: header_section)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
= render Procedure::NoticeComponent.new(procedure: dossier.procedure)
|
||||
|
||||
= render EditableChamp::SectionComponent.new(dossier: dossier_for_editing, types_de_champ: dossier_for_editing.revision.types_de_champ_public)
|
||||
%fieldset.fr-fieldset= render EditableChamp::SectionComponent.new(dossier: dossier_for_editing, types_de_champ: dossier_for_editing.revision.types_de_champ_public)
|
||||
|
||||
= render Dossiers::PendingCorrectionCheckboxComponent.new(dossier: dossier)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%section.counter-start-header-section
|
||||
= render NestedForms::FormOwnerComponent.new
|
||||
= form_for dossier, url: annotations_instructeur_dossier_path(dossier.procedure, dossier), html: { class: 'form', multipart: true } do |f|
|
||||
= render EditableChamp::SectionComponent.new(dossier:, types_de_champ: dossier.revision.types_de_champ_private)
|
||||
%fieldset.fr-fieldset= render EditableChamp::SectionComponent.new(dossier:, types_de_champ: dossier.revision.types_de_champ_private)
|
||||
|
||||
= render Dossiers::EditFooterComponent.new(dossier: dossier, annotation: true)
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue