[FIX] payment: Pay button always enabled with Term & Conditions
Steps to reproduce: - Go to the website shop - Add a product in the cart - Add your address and click on checkout - On the checkout, enable Terms & conditions Bug: The button was always enabled even if the check box with the terms & conditions were not checked. opw:2313437 closes odoo/odoo#55821 X-original-commit: 0415da51960819ec9c989e15a9229bd6d583ba1b Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -22,7 +22,9 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({
|
||||
* @override
|
||||
*/
|
||||
start: function () {
|
||||
$("#o_payment_form_pay").removeAttr('disabled');
|
||||
if(!$('#checkbox_cgv').length){
|
||||
$("#o_payment_form_pay").removeAttr('disabled');
|
||||
}
|
||||
var self = this;
|
||||
return this._super.apply(this, arguments).then(function () {
|
||||
self.options = _.extend(self.$el.data(), self.options);
|
||||
|
||||
Reference in New Issue
Block a user