From 28cec5e9e54338f896cfdd58cffaaf52bfe3c2dc Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 27 Mar 2022 01:13:09 +0100 Subject: [PATCH] make function simpler --- InvenTree/templates/js/translated/order.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index fae1e27d32..f0e6f12acf 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -1533,11 +1533,7 @@ function loadPurchaseOrderExtraLineTable(table, options={}) { html += makeIconButton('fa-clone', 'button-duplicate', pk, '{% trans "Duplicate line" %}'); html += makeIconButton('fa-edit icon-blue', 'button-edit', pk, '{% trans "Edit line" %}'); - - var title = '{% trans "Delete line" %}'; - - // Prevent deletion of the line if items have been allocated or shipped! - html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, title, ); + html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, '{% trans "Delete line" %}', ); html += ``; @@ -3172,11 +3168,7 @@ function loadSalesOrderExtraLineTable(table, options={}) { html += makeIconButton('fa-clone', 'button-duplicate', pk, '{% trans "Duplicate line" %}'); html += makeIconButton('fa-edit icon-blue', 'button-edit', pk, '{% trans "Edit line" %}'); - - var title = '{% trans "Delete line" %}'; - - // Prevent deletion of the lines if items have been allocated or shipped! - html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, title, ); + html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, '{% trans "Delete line" %}', ); html += ``;