diff --git a/InvenTree/part/templates/part/upload_bom.html b/InvenTree/part/templates/part/upload_bom.html index 07213069a6..57c7014197 100644 --- a/InvenTree/part/templates/part/upload_bom.html +++ b/InvenTree/part/templates/part/upload_bom.html @@ -22,8 +22,11 @@ + {% endblock %} diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index f1c749320f..0c70bd3d86 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -210,6 +210,10 @@ function submitBomTable(part_id, options={}) { getApiEndpointOptions(url, function(response) { var fields = response.actions.POST; + // Disable the "Submit BOM" button + $('#bom-submit').prop('disabled', true); + $('#bom-submit-icon').show(); + inventreePut(url, data, { method: 'POST', success: function(response) { @@ -224,6 +228,10 @@ function submitBomTable(part_id, options={}) { showApiError(xhr, url); break; } + + // Re-enable the submit button + $('#bom-submit').prop('disabled', false); + $('#bom-submit-icon').hide(); } }); });