Template:2011FR/Form-section-processing: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
testing wrapping in a dummy div, to fix <p> insertion |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq:{{{handler}}}|GC |
<div>{{#ifeq:{{{handler}}}|GC |
||
|<!-- Start of GlobalCollect handling code --> |
|||
<html> |
|||
<script type="text/ |
<script type="text/javascript"> |
||
function redirectPayment(i) { |
function redirectPayment(i) { |
||
⚫ | |||
//************************************ credit card ************************************ |
//************************************ credit card ************************************ |
||
//if i == cc |
//if i == cc |
||
var paymentType ="cc"; |
var paymentType ="cc"; |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-CC-masthead|none}}}<html>\x26form_name=</html>{{{GC-CC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-CC-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-CC-masthead|none}}}<html>\x26form_name=</html>{{{GC-CC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-CC-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>" |
||
if(monthlyDonation == true) { |
|||
action_url += ("\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>").replace('cc','rcc'); |
|||
} else { |
|||
action_url += "\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>"; |
|||
⚫ | |||
//************************************ credit card ************************************ |
//************************************ credit card ************************************ |
||
//****************************** realtime ************************************************** |
//****************************** realtime ************************************************** |
||
if (i=="rtbt-ideal"){ |
if (i=="rtbt-ideal") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-ideal}}}\x26payment_method=rtbt<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-ideal}}}\x26payment_method=rtbt<html>"; |
||
} |
} |
||
if (i=="rtbt-eps"){ |
if (i=="rtbt-eps") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-eps}}}\x26payment_method=rtbt<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-eps}}}\x26payment_method=rtbt<html>"; |
||
} |
} |
||
if (i=="rtbt-sofo"){ |
if (i=="rtbt-sofo") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-sofo}}}\x26payment_method=rtbt<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ideal-ffname|rtbt-sofo}}}\x26payment_method=rtbt<html>"; |
||
} |
} |
||
//****************************** realtime ************************************************** |
//****************************** realtime ************************************************** |
||
//****************************** Bank Transfer *********************************** |
//****************************** Bank Transfer *********************************** |
||
if (i=="bt"){ |
if (i=="bt") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-BT-masthead|none}}}<html>\x26form_name=</html>{{{GC-BT-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-BT-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BT-ffname|bt}}}\x26payment_method=bt<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-BT-masthead|none}}}<html>\x26form_name=</html>{{{GC-BT-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-BT-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BT-ffname|bt}}}\x26payment_method=bt<html>"; |
||
} |
|||
⚫ | |||
⚫ | |||
⚫ | var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-BP-masthead|none}}}<html>\x26form_name=</html>{{{GC-BP-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-BP-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BP-ffname|obt-bpay}}}\x26payment_method=obt<html>"; |
||
} |
} |
||
⚫ | |||
//****************************** Direct Debit *********************************** |
//****************************** Direct Debit *********************************** |
||
if (i=="dd"){ |
if (i=="dd") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-DD-ffname|webitects2nd}}}\x26payment_method=dd<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-DD-masthead|none}}}<html>\x26form_name=</html>{{{GC-DD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-DD-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-DD-ffname|webitects2nd}}}\x26payment_method=dd<html>"; |
||
} |
} |
||
Line 38: | Line 49: | ||
//********************************** eWallets ******************************************* |
//********************************** eWallets ******************************************* |
||
if (i=="pp"||i=="ew-pp"){ |
if (i=="pp"||i=="ew-pp") { |
||
paymentType = "pp"; |
paymentType = "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
||
Line 46: | Line 57: | ||
gateway.value = "paypal"; |
gateway.value = "paypal"; |
||
document.paypalcontribution.appendChild(gateway); |
document.paypalcontribution.appendChild(gateway); |
||
if (monthlyDonation == true) { |
|||
var recurring = document.createElement("input"); |
|||
recurring.type = "hidden"; |
|||
recurring.name = "recurring_paypal"; |
|||
recurring.id = "recurring-hidden"; |
|||
recurring.value = "true"; |
|||
⚫ | |||
} |
} |
||
} |
|||
if (i=="ew-pp-usd"){ |
if (i=="ew-pp-usd") { |
||
paymentType = "pp"; |
paymentType = "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
||
Line 57: | Line 77: | ||
document.paypalcontribution.appendChild(gateway); |
document.paypalcontribution.appendChild(gateway); |
||
document.getElementsByName("currency_code")[0].value="USD"; |
document.getElementsByName("currency_code")[0].value="USD"; |
||
document.getElementsByName("amountGiven")[0].value=""; |
|||
for ( var j = 0; j < document.getElementsByName("amount").length; j++ ) { |
|||
document.getElementsByName("amount")[j].checked=false; |
|||
} |
} |
||
if (monthlyDonation == true) { |
|||
var recurring = document.createElement("input"); |
|||
recurring.type = "hidden"; |
|||
recurring.name = "recurring_paypal"; |
|||
recurring.id = "recurring-hidden"; |
|||
recurring.value = "true"; |
|||
document.paypalcontribution.appendChild(recurring); |
|||
} |
|||
} |
|||
if (i=="rpp"||i=="ew- |
if (i=="rpp"||i=="ew-rpp") { |
||
paymentType= "pp"; |
paymentType= "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
||
Line 76: | Line 106: | ||
recurring.value = "true"; |
recurring.value = "true"; |
||
document.paypalcontribution.appendChild(recurring); |
document.paypalcontribution.appendChild(recurring); |
||
} |
|||
if (i=="ew-webmoney") { |
|||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-BT-masthead|none}}}<html>\x26form_name=</html>{{{GC-BT-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-BT-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BT-ffname|ew-webmoney}}}\x26payment_method=wm<html>"; |
|||
} |
} |
||
//************************************** needs to be configured ************************************** |
//************************************** needs to be configured ************************************** |
||
if (i=="ew-yd"){ |
if (i=="ew-yd") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-YD-masthead|none}}}<html>\x26form_name=</html>{{{GC-YD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-YD-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-YD-ffname|webitects2nd}}}\x26payment_method=yd<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-YD-masthead|none}}}<html>\x26form_name=</html>{{{GC-YD-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-YD-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-YD-ffname|webitects2nd}}}\x26payment_method=yd<html>"; |
||
} |
} |
||
if (i=="ew-mb"){ |
if (i=="ew-mb") { |
||
paymentType = "pp"; |
paymentType = "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
||
Line 93: | Line 127: | ||
} |
} |
||
⚫ | |||
⚫ | var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-BP-masthead|none}}}<html>\x26form_name=</html>{{{GC-BP-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-BP-text-template|2010/JimmyQuote}}}<html>\x26appeal=JimmyQuote\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BP-ffname| |
||
⚫ | |||
//********************************** eWallets ******************************************* |
//********************************** eWallets ******************************************* |
||
//*************************************************** needs to be configured ********************************************* |
//*************************************************** needs to be configured ********************************************* |
||
Line 102: | Line 133: | ||
// ************************Do not change without the permission of Faulkner*************************** |
// ************************Do not change without the permission of Faulkner*************************** |
||
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' |
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.'; |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ paymentType; |
|||
if(getQuerystring( 'template' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
⚫ | |||
if(getQuerystring( 'appeal-template' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
⚫ | |||
if(getQuerystring( 'appeal' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
⚫ | |||
if(getQuerystring( 'form-template' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
⚫ | |||
if(getQuerystring( 'form-countryspecific' )=='') |
|||
document.paypalcontribution.utm_source.value += 'control'; |
|||
else |
|||
⚫ | |||
document.paypalcontribution.utm_source.value += '.' + paymentType; |
|||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
|||
//****************************** End Faulkner ****************************************************** |
//****************************** End Faulkner ****************************************************** |
||
if (i=="ew-pp-usd"){ |
|||
⚫ | |||
if(typeof(OWA) !== 'undefined'){OWATracker.shareStateByPost( document.paypalcontribution );} |
|||
document.paypalcontribution.submit(); |
|||
} |
|||
else if (validateForm(document.paypalcontribution)) { |
|||
if(typeof(OWA) !== 'undefined'){OWATracker.shareStateByPost( document.paypalcontribution );} |
if(typeof(OWA) !== 'undefined'){OWATracker.shareStateByPost( document.paypalcontribution );} |
||
document.paypalcontribution.submit(); |
document.paypalcontribution.submit(); |
||
Line 121: | Line 176: | ||
</script> |
</script> |
||
</html> |
</html> |
||
<!-- End of GlobalCollect handling code --> |
|||
| |
| |
||
<!-- Start of NON-GlobalCollect handling code --> |
|||
<html> |
<html> |
||
<script type="text/ |
<script type="text/javascript"> |
||
function redirectPayment(i) { |
function redirectPayment(i) { |
||
//if i == cc |
//if i == cc |
||
var paymentType ="cc"; |
var paymentType ="cc"; |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:PayflowProGateway?uselang=</html>{{int:lang}}\x26masthead={{{PF-masthead|none}}}\x26form_name={{{PF-form-name|TwoStepTwoColumnLetter2}}}\x26text_template={{{PF-text-template|2010/JimmyQuote}}}\x26language={{int:lang}}\x26ffname={{{PF-ffname}}}<html>"; |
var action_url = "https://payments.wikimedia.org/index.php/Special:PayflowProGateway?uselang=</html>{{int:lang}}\x26masthead={{{PF-masthead|none}}}\x26form_name={{{PF-form-name|TwoStepTwoColumnLetter2}}}\x26text_template={{{PF-text-template|2010/JimmyQuote-green}}}\x26language={{int:lang}}\x26ffname={{{PF-ffname}}}<html>"; |
||
if (i=="pp") { |
if (i=="pp") { |
||
Line 138: | Line 195: | ||
gateway.value = "paypal"; |
gateway.value = "paypal"; |
||
document.paypalcontribution.appendChild(gateway); |
document.paypalcontribution.appendChild(gateway); |
||
} |
|||
if (i=="rpp"){ |
if (i=="rpp") { |
||
paymentType = "pp"; |
paymentType = "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
||
Line 155: | Line 212: | ||
recurring.value = "true"; |
recurring.value = "true"; |
||
document.paypalcontribution.appendChild(recurring); |
document.paypalcontribution.appendChild(recurring); |
||
} |
|||
document.paypalcontribution.action = action_url; |
document.paypalcontribution.action = action_url; |
||
// ************************Do not change without the permission of Faulkner*************************** |
// ************************Do not change without the permission of Faulkner*************************** |
||
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' |
|||
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~' |
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~' |
||
+ getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~' |
+ getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~' |
||
Line 167: | Line 225: | ||
+ paymentType; |
+ paymentType; |
||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
|||
⚫ | |||
//****************************** End Faulkner ****************************************************** |
//****************************** End Faulkner ****************************************************** |
||
Line 178: | Line 235: | ||
</script> |
</script> |
||
</html> |
</html> |
||
<!-- End of NON-GlobalCollect handling code --> |
|||
}} |
}} |
||
</div> |