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

From Donate
Jump to navigation Jump to search
Content deleted Content added
changes Matt suggested
No edit summary
Line 7: Line 7:
</style>
</style>
<script>
<script>
donationForm = {};

function redirectPayment (legacyPaymentMethod) {
function redirectPayment (legacyPaymentMethod) {
// wrapper for new function
// wrapper for new function
Line 14: Line 16:
switch (legacyPaymentMethod) {
switch (legacyPaymentMethod) {
case 'cc':
case 'cc':
mw.donationForm.redirectPaymentWithSubMethod('cc');
donationForm.redirectPaymentWithSubMethod('cc');
break;
break;


Line 23: Line 25:
case 'ew-pp-usd':
case 'ew-pp-usd':
case 'ew-pp-eur':
case 'ew-pp-eur':
mw.donationForm.redirectPaymentWithSubMethod('paypal');
donationForm.redirectPaymentWithSubMethod('paypal');
break;
break;


case 'dd':
case 'dd':
mw.donationForm.redirectPaymentWithSubMethod('dd');
donationForm.redirectPaymentWithSubMethod('dd');
break;
break;


case 'rtbt-id':
case 'rtbt-id':
mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_ideal');
donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_ideal');
break;
break;


case 'ew-yd':
case 'ew-yd':
mw.donationForm.redirectPaymentWithSubMethod('ew', 'ew_yandex');
donationForm.redirectPaymentWithSubMethod('ew', 'ew_yandex');
break;
break;


case 'rtbt-sf':
case 'rtbt-sf':
mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_sofortuberweisung');
donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_sofortuberweisung');
break;
break;


case 'ew-amazon':
case 'ew-amazon':
mw.donationForm.redirectPaymentWithSubMethod('amazon');
donationForm.redirectPaymentWithSubMethod('amazon');
break;
break;


case 'obt-bp':
case 'obt-bp':
mw.donationForm.redirectPaymentWithSubMethod('obt', 'bpay');
donationForm.redirectPaymentWithSubMethod('obt', 'bpay');
break;
break;


case 'ew-wm':
case 'ew-wm':
mw.donationForm.redirectPaymentWithSubMethod('ew', 'ew_webmoney');
donationForm.redirectPaymentWithSubMethod('ew', 'ew_webmoney');
break;
break;


case 'cash-bl':
case 'cash-bl':
mw.donationForm.redirectPaymentWithSubMethod('cash', 'boleto');
donationForm.redirectPaymentWithSubMethod('cash', 'boleto');
break;
break;


case 'rtbt-en':
case 'rtbt-en':
mw.donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_enets');
donationForm.redirectPaymentWithSubMethod('rtbt', 'rtbt_enets');
break;
break;
}
}
Line 65: Line 67:
}
}


mw.donationForm.redirectPaymentWithSubMethod = function(paymentMethod, paymentSubMethod) {
donationForm.redirectPaymentWithSubMethod = function(paymentMethod, paymentSubMethod) {


// set up inputs
// set up inputs
Line 111: Line 113:
}
}


mw.donationForm.addAnalytics();
donationForm.addAnalytics();
if (validateForm(form)) {
if (validateForm(form)) {
Line 119: Line 121:
}
}


mw.donationForm.addAnalytics = function() {
donationForm.addAnalytics = function() {
// stuffs parameters into utm_source to make them available for analytics
// stuffs parameters into utm_source to make them available for analytics



Revision as of 12:34, 23 October 2013