[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.
This commit is contained in:
Nicolas Martinelli
2015-10-01 17:01:23 +02:00
parent 86e50baefc
commit dda5eb7dff
@@ -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', {