From a6379e2e67ffa1436d818fd55f37faed4893a87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 27 May 2014 11:34:55 +0200 Subject: [PATCH] [IMP] payment addons: fixed submit buttons: now have type=submit (and not image or nothing) and removed name, because this may cause issues when trying to submit a form manually with type=submit and a name. Also improved js code in website_sale to correctly handle the click binding, the asynchronous call to the server to create the transaction, and then submit the form. As form submission is synchronous in javascript, we cannot use the deferred. Instead we prevent the click event from bubbling, wait for the server to create the transaction, adn then manually submit the form. --- addons/payment_adyen/views/adyen.xml | 2 +- addons/payment_ogone/views/ogone.xml | 2 +- addons/payment_paypal/views/paypal.xml | 2 +- addons/payment_transfer/views/transfer.xml | 2 +- .../static/src/js/website_sale_payment.js | 20 ++++++++++--------- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/addons/payment_adyen/views/adyen.xml b/addons/payment_adyen/views/adyen.xml index 75e166f92fe..79281f43a99 100644 --- a/addons/payment_adyen/views/adyen.xml +++ b/addons/payment_adyen/views/adyen.xml @@ -20,7 +20,7 @@ -