demarches-normaliennes/app/components/editable_champ/textarea_component/textarea_component.html.haml

11 lines
583 B
Text
Raw Normal View History

2024-03-07 12:06:00 +01:00
~ @form.text_area(:value, input_opts(id: @champ.input_id, aria: { describedby: @champ.describedby_id }, rows: 6, required: @champ.required?, value: html_to_string(@champ.value), data: { controller: 'autoresize' }))
%div{ role: 'status' }
- if @champ.character_limit_info?
%p.fr-info-text
= t('.remaining_characters', remaining_words: @champ.remaining_characters)
- if @champ.character_limit_warning?
%p.fr-icon--sm.fr-mt-4v.fr-mb-0.fr-hint-text.fr-icon-warning-fill.fr-text-default--warning
= t('.excess_characters', excess_words: @champ.excess_characters)