From dda5eb7dff15992f86c9d6925c8d7208a172de77 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 1 Oct 2015 16:53:26 +0200 Subject: [PATCH] [FIX] website_quote: remove loading attribute if missing data In commit bc43417b, a loading attribute is set on any submit button. The problem is that this attribute is the first thing to be set. Therefore, we cannot prevent its propagation. Since Bootstrap sets this 'loading' attribute in a setTimeout, we need to remove it in a setTimeout as well. --- addons/website_quote/static/src/js/website_quotation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website_quote/static/src/js/website_quotation.js b/addons/website_quote/static/src/js/website_quotation.js index d1c38d85633..88948908295 100644 --- a/addons/website_quote/static/src/js/website_quotation.js +++ b/addons/website_quote/static/src/js/website_quotation.js @@ -79,6 +79,9 @@ if(!$('.o_website_quote').length) { self.$('#signer').toggleClass('has-error', !signer_name); self.$('#drawsign').toggleClass('panel-danger', is_empty).toggleClass('panel-default', !is_empty); if (is_empty || ! signer_name){ + setTimeout(function () { + self.$('button[type="submit"], a.a-submit').removeAttr('data-loading-text').button('reset'); + }) return false; } ajax.jsonRpc("/quote/"+action[1], 'call', {