Template:2012FR/Form-section/Processing/Default: Difference between revisions
Jump to navigation
Jump to search
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: | Line 10: | ||
switch (legacyPaymentMethod) { |
switch (legacyPaymentMethod) { |
||
case 'cc': |
case 'cc': |
||
donationForm. |
donationForm.redirectPayment('cc'); |
||
break; |
break; |
||
Line 19: | Line 19: | ||
case 'ew-pp-usd': |
case 'ew-pp-usd': |
||
case 'ew-pp-eur': |
case 'ew-pp-eur': |
||
donationForm. |
donationForm.redirectPayment('paypal'); |
||
break; |
break; |
||
case 'dd': |
case 'dd': |
||
donationForm. |
donationForm.redirectPayment('dd'); |
||
break; |
break; |
||
case 'rtbt-id': |
case 'rtbt-id': |
||
donationForm. |
donationForm.redirectPayment('rtbt', 'rtbt_ideal'); |
||
break; |
break; |
||
case 'ew-yd': |
case 'ew-yd': |
||
donationForm. |
donationForm.redirectPayment('ew', 'ew_yandex'); |
||
break; |
break; |
||
case 'rtbt-sf': |
case 'rtbt-sf': |
||
donationForm. |
donationForm.redirectPayment('rtbt', 'rtbt_sofortuberweisung'); |
||
break; |
break; |
||
case 'ew-amazon': |
case 'ew-amazon': |
||
donationForm. |
donationForm.redirectPayment('amazon'); |
||
break; |
break; |
||
case 'obt-bp': |
case 'obt-bp': |
||
donationForm. |
donationForm.redirectPayment('obt', 'bpay'); |
||
break; |
break; |
||
case 'ew-wm': |
case 'ew-wm': |
||
donationForm. |
donationForm.redirectPayment('ew', 'ew_webmoney'); |
||
break; |
break; |
||
case 'cash-bl': |
case 'cash-bl': |
||
donationForm. |
donationForm.redirectPayment('cash', 'boleto'); |
||
break; |
break; |
||
case 'rtbt-en': |
case 'rtbt-en': |
||
donationForm. |
donationForm.redirectPayment('rtbt', 'rtbt_enets'); |
||
break; |
break; |
||
} |
} |
||
Line 61: | Line 61: | ||
} |
} |
||
donationForm. |
donationForm.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) { |
||
// set up inputs |
// set up inputs |
||
Line 110: | Line 110: | ||
donationForm.addAnalytics(); |
donationForm.addAnalytics(); |
||
if (validateForm(form)) { |
if (validateForm(form) || skipValidation) { |
||
form.method = "POST"; |
form.method = "POST"; |
||
form.submit(); |
form.submit(); |
Revision as of 13:47, 6 January 2014