Sha256: dc05888df088c2e9652c0fcc2cc572466bde76058239429edc3d969e8d51fd5d
Contents?: true
Size: 853 Bytes
Versions: 6
Compression:
Stored size: 853 Bytes
Contents
//= require spree/frontend MercadoPago = { hidePaymentSaveAndContinueButton: function(paymentMethod) { if (MercadoPago.paymentMethodID && paymentMethod.val() == MercadoPago.paymentMethodID) { $('.continue').hide(); $('[data-hook=coupon_code]').hide(); } else { $('.continue').show(); $('[data-hook=coupon_code]').show(); } } }; $(document).ready(function() { checkedPaymentMethod = $('div[data-hook="checkout_payment_step"] input[type="radio"]:checked'); MercadoPago.hidePaymentSaveAndContinueButton(checkedPaymentMethod); paymentMethods = $('div[data-hook="checkout_payment_step"] input[type="radio"]').click(function (e) { MercadoPago.hidePaymentSaveAndContinueButton($(e.target)); }); $('button.mercado_pago_button').click(function(event){ $(event.target).prop("disabled",true); }); });
Version data entries
6 entries across 6 versions & 3 rubygems