fix(a11y/attachment): associate input to label, no empty id

This commit is contained in:
Colin Darie 2022-11-24 13:45:33 +01:00
parent 1db40de70e
commit 42b84384dd
2 changed files with 3 additions and 4 deletions

View file

@ -1,4 +1,4 @@
.attachment.fr-upload-group{ id: attachment ? dom_id(attachment, :edit) : nil, class: class_names("fr-mb-2w": !(as_multiple? && downloadable?)) }
.attachment.fr-upload-group{ { id: attachment ? dom_id(attachment, :edit) : nil, class: class_names("fr-mb-2w": !(as_multiple? && downloadable?)) }.compact }
- if persisted?
%div{ id: dom_id(attachment, :persisted_row) }
.flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) }