%table.index.edit-note-table
  %tr.edit-note.hidden.total
    %td{ :colspan => "5" }
      %label
        = t(".note_label")
      = text_field_tag :note, @order.note

    %td.actions
      = link_to '', '', class: 'save-note icon_link icon-ok no-text with-tip', data: { action: 'save' }, title: I18n.t('actions.save')
      = link_to '', '', class: 'cancel-note icon_link icon-cancel no-text with-tip', data: { action: 'cancel' }, title: I18n.t('actions.cancel')

  %tr.show-note.total
    %td{ :colspan => "5" }
      - if order.note.present?
        %strong
          = t(".note_label")
        = order.note
      - else
        = t(".no_note_present")

    %td.actions
      = link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')

%table.index.edit-note-table
  %tr.edit-note.hidden.total
    %td{ colspan: "5", data: { controller: "input-char-count" }, style: "position: relative;" }
      %label
        = t(".note_label")
      = 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')
      = link_to '', '', class: 'cancel-note icon_link icon-cancel no-text with-tip', data: { action: 'cancel' }, title: I18n.t('actions.cancel')

  %tr.show-note.total
    %td{ :colspan => "5" }
      - if order.note.present?
        %strong
          = t(".note_label")
        = order.note
      - else
        = t(".no_note_present")

    %td.actions
      = link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')

Add counter on note input
Add counter on note input
