diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js
index 4fa178923c..3106c3b9f0 100644
--- a/InvenTree/templates/js/translated/bom.js
+++ b/InvenTree/templates/js/translated/bom.js
@@ -69,13 +69,14 @@ function constructBomUploadTable(data, options={}) {
var buttons = `
`;
- buttons += makeIconButton('fa-file-alt', 'button-row-data', idx, '{% trans "Display row data" %}');
+ // buttons += makeIconButton('fa-file-alt', 'button-row-data', idx, '{% trans "Display row data" %}');
buttons += makeIconButton('fa-times icon-red', 'button-row-remove', idx, '{% trans "Remove row" %}');
buttons += `
`;
var html = `
+ ${buttons} |
${sub_part} |
${quantity} |
${reference} |
@@ -84,7 +85,6 @@ function constructBomUploadTable(data, options={}) {
${inherited} |
${optional} |
${note} |
- ${buttons} |
`;
$('#bom-import-table tbody').append(html);
@@ -111,6 +111,15 @@ function constructBomUploadTable(data, options={}) {
$(`#button-row-remove-${idx}`).click(function() {
$(`#bom_import_row_${idx}`).remove();
});
+
+ // Add callbacks for the fields which allow it
+ function addRowClearCallback(field_name) {
+ addClearCallback(`${field_name}_${idx}`, fields[field_name]);
+ }
+
+ addRowClearCallback('reference');
+ addRowClearCallback('overage');
+ addRowClearCallback('note');
}
// Request API endpoint options
diff --git a/InvenTree/templates/js/translated/forms.js b/InvenTree/templates/js/translated/forms.js
index dda79f2737..e5cb571a58 100644
--- a/InvenTree/templates/js/translated/forms.js
+++ b/InvenTree/templates/js/translated/forms.js
@@ -1240,8 +1240,14 @@ function addClearCallback(name, field, options) {
var field_name = getFieldName(name, options);
- var el = $(options.modal).find(`#clear_${field_name}`);
-
+ var el = null;
+
+ if (options && options.modal) {
+ el = $(options.modal).find(`#clear_${field_name}`);
+ } else {
+ el = $(`#clear_${field_name}`);
+ }
+
if (!el) {
console.log(`WARNING: addClearCallback could not find field '${name}'`);
return;