2022-12-15 13:08:20 +01:00
|
|
|
%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
|
2022-12-16 14:56:46 +01:00
|
|
|
.fr-error-text{ id: error_message_id }
|
|
|
|
%ul.list-style-type-none.fr-pl-0
|
2022-12-15 13:08:20 +01:00
|
|
|
- error_messages.map do |error_message|
|
|
|
|
%li= error_message
|
|
|
|
|