From 86f5385aec82363f86796dee7f7ba6462ff7f2c5 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Sun, 16 Mar 2025 16:00:56 +0500 Subject: [PATCH 1/2] 13179: fix notes field length issue - notes field was a children of label element - due to this its size was bound by the label element - now this commit makes it a sibling, making it occupy the width of column width --- app/views/spree/admin/orders/_note.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/orders/_note.html.haml b/app/views/spree/admin/orders/_note.html.haml index fb46907191..7ad0ef2829 100644 --- a/app/views/spree/admin/orders/_note.html.haml +++ b/app/views/spree/admin/orders/_note.html.haml @@ -3,7 +3,7 @@ %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" } } + = 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 From 806965b2cdabc0029ea4e7c908b7a24c94211b7c Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Mon, 24 Mar 2025 00:43:07 +0500 Subject: [PATCH 2/2] add textarea field plus the preformatted tag to display paragraph formatting in the notes --- app/views/spree/admin/orders/_note.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/spree/admin/orders/_note.html.haml b/app/views/spree/admin/orders/_note.html.haml index 7ad0ef2829..7eaf1910c8 100644 --- a/app/views/spree/admin/orders/_note.html.haml +++ b/app/views/spree/admin/orders/_note.html.haml @@ -1,9 +1,9 @@ %table.index.edit-note-table %tr.edit-note.hidden.total %td{ colspan: "5", data: { controller: "input-char-count" }, style: "position: relative;" } - %label + %label{ for: "note" } = t(".note_label") - = text_field_tag :note, @order.note, { maxLength: 280, data: { "input-char-count-target": "input" } } + = text_area_tag :note, @order.note, { id: "note", rows: 3, maxLength: 280, data: { "input-char-count-target": "input" }, style: "width: 100%;" } %span.edit-note-count{ data: { "input-char-count-target": "count" }, style: "position: absolute; right: 7px; top: 7px; font-size: 11px;" } %td.actions @@ -15,7 +15,8 @@ - if order.note.present? %strong = t(".note_label") - = order.note + %pre{ style: "font-family: inherit;" } + = order.note - else = t(".no_note_present")