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 |
||
(47 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq:{{{handler}}}|GC |
<div>{{#ifeq:{{{handler}}}|GC |
||
|<!-- Start of GlobalCollect handling code --> |
|||
|<html> |
|||
<html> |
|||
<script type="text/javascript" language="javascript"> |
|||
<script type="text/javascript"> |
|||
function redirectPayment(i) { |
function redirectPayment(i) { |
||
document.getElementsByName("currency_code")[0].value="</html>{{2011FR/core-currency-code|{{{country}}}}}<html>"; |
|||
//************************************ 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-masthead|none}}}<html>\x26form_name=</html>{{{GC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-text-template|2010/JimmyQuote}}}<html>\x26appeal= |
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 ************************************ |
|||
//****************************** realtime ************************************************** |
|||
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-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") { |
|||
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") { |
|||
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 ************************************************** |
|||
//****************************** Bank Transfer *********************************** |
|||
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-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-BT-ffname|bt}}}\x26payment_method=bt<html>"; |
|||
} |
|||
//****************************** Online Bank Transfer *********************************** |
|||
if (i=="obt-bp") { |
|||
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 *********************************** |
|||
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-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-DD-ffname|webitects2nd}}}\x26payment_method=dd<html>"; |
|||
} |
|||
//****************************** Direct Debit *********************************** |
|||
//********************************** eWallets ******************************************* |
|||
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>"; |
||
var gateway = document.createElement("input"); |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "paypal"; |
|||
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"; |
|||
document.paypalcontribution.appendChild(recurring); |
|||
} |
} |
||
} |
|||
if (i==" |
if (i=="ew-pp-usd") { |
||
paymentType = "pp"; |
|||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
|||
var gateway = document.createElement("input"); |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "paypal"; |
|||
document.paypalcontribution.appendChild(gateway); |
|||
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-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>"; |
||
var gateway = document.createElement("input"); |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "paypal"; |
|||
document.paypalcontribution.appendChild(gateway); |
|||
var recurring = document.createElement("input"); |
var recurring = document.createElement("input"); |
||
Line 22: | Line 107: | ||
document.paypalcontribution.appendChild(recurring); |
document.paypalcontribution.appendChild(recurring); |
||
} |
} |
||
if (i==" |
if (i=="ew-webmoney") { |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-masthead|none}}}<html>\x26form_name=</html>{{{GC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-text-template|2010/JimmyQuote}}}<html>\x26appeal= |
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 ************************************** |
|||
if (i=="dd"){ |
|||
if (i=="ew-yd") { |
|||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-masthead|none}}}<html>\x26form_name=</html>{{{GC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-text-template|2010/JimmyQuote}}}<html>\x26appeal=</html>{{{appeal|Appeal-default}}}<html>\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ffname-DD|webitects2nd}}}<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==" |
if (i=="ew-mb") { |
||
paymentType = "pp"; |
|||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-masthead|none}}}<html>\x26form_name=</html>{{{GC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-text-template|2010/JimmyQuote}}}<html>\x26appeal=</html>{{{appeal|Appeal-default}}}<html>\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-ffname-RT|webitects2nd}}}<html>"; |
|||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
|||
var gateway = document.createElement("input"); |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "moneybookers"; |
|||
document.paypalcontribution.appendChild(gateway); |
|||
} |
} |
||
//********************************** eWallets ******************************************* |
|||
//*************************************************** needs to be configured ********************************************* |
|||
document.paypalcontribution.action = action_url; |
document.paypalcontribution.action = action_url; |
||
// ************************Do not change without the permission of Faulkner*************************** |
|||
//document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' + getLandingPage() + '.' + paymentType; |
|||
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' |
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.'; |
||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_' + getQuerystring( 'country' ); |
|||
//document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_</html>{{2011FR/core-country-region|{{{country}}}}}<html>'; |
|||
if(getQuerystring( 'template' )=='') |
|||
if (validateForm(document.paypalcontribution)) { |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
document.paypalcontribution.utm_source.value += getQuerystring( 'template' ).replace("Lp-layout-","") + '~'; |
|||
if(getQuerystring( 'appeal-template' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
document.paypalcontribution.utm_source.value += getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~'; |
|||
if(getQuerystring( 'appeal' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
document.paypalcontribution.utm_source.value += getQuerystring( 'appeal' ).replace("Appeal-","") + '~'; |
|||
if(getQuerystring( 'form-template' )=='') |
|||
document.paypalcontribution.utm_source.value += 'default' + '~'; |
|||
else |
|||
document.paypalcontribution.utm_source.value += getQuerystring( 'form-template' ).replace("Form-template-","") + '~'; |
|||
if(getQuerystring( 'form-countryspecific' )=='') |
|||
document.paypalcontribution.utm_source.value += 'control'; |
|||
else |
|||
document.paypalcontribution.utm_source.value += getQuerystring( 'form-countryspecific' ).replace("Form-countryspecific-",""); |
|||
document.paypalcontribution.utm_source.value += '.' + paymentType; |
|||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
|||
//****************************** 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 49: | 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") { |
||
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>"; |
||
var gateway = document.createElement("input"); |
|||
} |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "paypal"; |
|||
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>"; |
||
var gateway = document.createElement("input"); |
|||
gateway.type = "hidden"; |
|||
gateway.name = "gateway"; |
|||
gateway.value = "paypal"; |
|||
document.paypalcontribution.appendChild(gateway); |
|||
var recurring = document.createElement("input"); |
var recurring = document.createElement("input"); |
||
Line 73: | 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*************************** |
|||
//document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' + getLandingPage() + '.' + '</html>{{{form-countryspecific}}}<html>' + '_' + '</html>{{{appeal}}}<html>' + '.' + paymentType; |
|||
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' |
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' |
||
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~' |
|||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_' + getQuerystring( 'country' ); |
|||
+ getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~' |
|||
//document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_</html>{{2011FR/core-country-region|{{{country}}}}}<html>'; |
|||
+ getQuerystring( 'appeal' ).replace("Appeal-","") + '~' |
|||
+ getQuerystring( 'form-template' ).replace("Form-template-","") + '~' |
|||
+ getQuerystring( 'form-countryspecific' ).replace("Form-countryspecific-","") + '.' |
|||
+ paymentType; |
|||
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ); |
|||
//****************************** End Faulkner ****************************************************** |
|||
if (validateForm(document.paypalcontribution)) { |
if (validateForm(document.paypalcontribution)) { |
||
Line 88: | Line 235: | ||
</script> |
</script> |
||
</html> |
</html> |
||
<!-- End of NON-GlobalCollect handling code --> |
|||
}} |
}} |
||
</div> |