fix(sva): disable svr configuration since until implementation

This commit is contained in:
Colin Darie 2023-06-21 12:37:21 +02:00
parent f369775d5b
commit 07f10070e9
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
4 changed files with 16 additions and 6 deletions

View file

@ -13,4 +13,10 @@ class Dsfr::RadioButtonListComponent < ApplicationComponent
# https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/bouton-radio/
@error.present?
end
def each_button
@buttons.each do |button|
yield(*button.values_at(:label, :value, :hint), **button.except(:label, :value, :hint))
end
end
end

View file

@ -2,14 +2,18 @@
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
= content
- @buttons.map { _1.values_at(:label, :value, :hint) }.each do |label, value, hint|
- each_button do |label, value, hint, **button_options|
.fr-fieldset__element
.fr-radio-group
= @form.radio_button @target, value
= @form.radio_button @target, value, **button_options
= @form.label @target, value: value, class: 'fr-label' do
- capture do
= label
%span.fr-hint-text= hint
= button_options[:after_label] if button_options[:after_label]
%span.fr-hint-text= hint if hint
.fr-messages-group{ 'aria-live': 'assertive' }
- if error?
%p.fr-message.fr-message--error= error