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:
@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user