demarches-normaliennes/app/components/dsfr/input_component/input_component.html.haml

14 lines
466 B
Text

%div{ class: input_group_class_names }
= @form.label @attribute, label.html_safe, class: "fr-label"
= @form.send(@input_type, @attribute, input_opts)
- if errors_on_attribute?
- if error_messages.size == 1
%p.fr-error-text{ id: error_message_id }= error_messages.first
- else
.fr-error-text{ id: error_message_id }
%ul.list-style-type-none.fr-pl-0
- error_messages.map do |error_message|
%li= error_message