2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Disable "submit" button to prevent multiple simultaneous uploads

This commit is contained in:
Oliver
2022-02-10 00:00:23 +11:00
parent d38a8adf4c
commit ffb319e136
2 changed files with 12 additions and 1 deletions

View File

@ -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();
}
});
});