Add counter on note input

This commit is contained in:
Jean-Baptiste Bellet
2022-06-30 15:37:55 +02:00
parent de8c71d098
commit 89809aed5f

View File

@@ -1,9 +1,10 @@
%table.index.edit-note-table
%tr.edit-note.hidden.total
%td{ :colspan => "5" }
%td{ colspan: "5", data: { controller: "input-char-count" }, style: "position: relative;" }
%label
= t(".note_label")
= text_field_tag :note, @order.note
= text_field_tag :note, @order.note, { maxLength: 280, data: { "input-char-count-target": "input" } }
%span.edit-note-count{ data: { "input-char-count-target": "count" }, style: "position: absolute; right: 7px; top: 7px; font-size: 11px;" }
%td.actions
= link_to '', '', class: 'save-note icon_link icon-ok no-text with-tip', data: { action: 'save' }, title: I18n.t('actions.save')