Template:2012FR/Form-section/Processing/Default: Difference between revisions

Content deleted Content added
Khorn (WMF) (talk | contribs)
No edit summary
rename redirectPayment, add way to skip validation (for USD methods where there's no need to select an amount)
Line 10:
switch (legacyPaymentMethod) {
case 'cc':
donationForm.redirectPaymentWithSubMethodredirectPayment('cc');
break;
 
Line 19:
case 'ew-pp-usd':
case 'ew-pp-eur':
donationForm.redirectPaymentWithSubMethodredirectPayment('paypal');
break;
 
case 'dd':
donationForm.redirectPaymentWithSubMethodredirectPayment('dd');
break;
 
case 'rtbt-id':
donationForm.redirectPaymentWithSubMethodredirectPayment('rtbt', 'rtbt_ideal');
break;
 
case 'ew-yd':
donationForm.redirectPaymentWithSubMethodredirectPayment('ew', 'ew_yandex');
break;
 
case 'rtbt-sf':
donationForm.redirectPaymentWithSubMethodredirectPayment('rtbt', 'rtbt_sofortuberweisung');
break;
 
case 'ew-amazon':
donationForm.redirectPaymentWithSubMethodredirectPayment('amazon');
break;
 
case 'obt-bp':
donationForm.redirectPaymentWithSubMethodredirectPayment('obt', 'bpay');
break;
 
case 'ew-wm':
donationForm.redirectPaymentWithSubMethodredirectPayment('ew', 'ew_webmoney');
break;
 
case 'cash-bl':
donationForm.redirectPaymentWithSubMethodredirectPayment('cash', 'boleto');
break;
 
case 'rtbt-en':
donationForm.redirectPaymentWithSubMethodredirectPayment('rtbt', 'rtbt_enets');
break;
}
Line 61:
}
 
donationForm.redirectPaymentWithSubMethodredirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) {
 
// set up inputs
Line 110:
donationForm.addAnalytics();
if (validateForm(form) || skipValidation) {
form.method = "POST";
form.submit();