a11y(champs): expose ids for UI on champ

This commit is contained in:
Paul Chavard 2022-01-05 11:32:05 +01:00
parent 5f179676c8
commit fc058f721d
3 changed files with 21 additions and 7 deletions

View file

@ -20,12 +20,6 @@ module ChampHelper
simple_format(auto_linked_text, {}, sanitize: false)
end
def describedby_id(champ)
if champ.description.present?
"desc-#{champ.type_de_champ.id}-#{champ.row}"
end
end
def auto_attach_url(form, object)
if object.is_a?(Champ) && object.persisted? && object.public?
champs_piece_justificative_url(object.id)