mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +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