From dc2fe9dcb13243cc167e3b2d10dafdfd41c6c062 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 3 Feb 2022 20:40:32 +0530 Subject: [PATCH] Resolve multiple rooms addition issue --- js/admin/orders.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/admin/orders.js b/js/admin/orders.js index 741cc28e6..d81f59d4d 100644 --- a/js/admin/orders.js +++ b/js/admin/orders.js @@ -493,6 +493,7 @@ function init() if (go) { + $('#submitAddProduct').attr('disabled', true); var query = 'ajax=1&token='+token+'&action=addProductOnOrder&id_order='+id_order+'&'; query += $('#add_product_warehouse').serialize()+'&'; @@ -537,6 +538,9 @@ function init() }, error : function(XMLHttpRequest, textStatus, errorThrown) { jAlert("Impossible to add the room to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); + }, + complete: function() { + $('#submitAddProduct').removeAttr('disabled'); } }); ajaxQueries.push(ajax_query);