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 |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1:
<div>{{#ifeq:{{{handler}}}|GC
|<!-- Start of GlobalCollect handling code -->
<script type="text/
function redirectPayment(i) {
//************************************ credit card ************************************
//if i == 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-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 {
else▼
{▼
action_url += "\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>";
}
Line 22 ⟶ 18:
//****************************** 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>";
}
Line 36 ⟶ 32:
//****************************** 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>";
}
Line 53 ⟶ 49:
//********************************** eWallets *******************************************
if (i=="pp"||i=="ew-pp") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 62 ⟶ 58:
document.paypalcontribution.appendChild(gateway);
if (monthlyDonation == true)
{▼
var recurring = document.createElement("input");
recurring.type = "hidden";
Line 73 ⟶ 68:
}
if (i=="ew-pp-usd") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 83 ⟶ 78:
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";
Line 98 ⟶ 91:
}
if (i=="rpp"||i=="ew-rpp") {
paymentType= "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 115 ⟶ 108:
}
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=="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-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>\x26ffname=</html>{{{GC-YD-ffname|webitects2nd}}}\x26payment_method=yd<html>";
}
if (i=="ew-mb") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 146 ⟶ 139:
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';
Line 165 ⟶ 162:
document.paypalcontribution.utm_source.value += '.' + paymentType;
//****************************** End Faulkner ******************************************************
Line 180 ⟶ 176:
</script>
</html>
<!-- End of GlobalCollect handling code -->
|
<!-- Start of NON-GlobalCollect handling code -->
<html>
<script type="text/
function redirectPayment(i) {
Line 197 ⟶ 195:
gateway.value = "paypal";
document.paypalcontribution.appendChild(gateway);
if (i=="rpp") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 214 ⟶ 212:
recurring.value = "true";
document.paypalcontribution.appendChild(recurring);
document.paypalcontribution.action = action_url;
// ************************Do not change without the permission of Faulkner***************************
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~'
+ getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~'
Line 226 ⟶ 225:
+ paymentType;
//****************************** End Faulkner ******************************************************
Line 237 ⟶ 235:
</script>
</html>
<!-- End of NON-GlobalCollect handling code -->
}}
</div>
|