Template:2011FR/Form-section-processing: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
Cbarr (talk | contribs)
No edit summary
testing wrapping in a dummy div, to fix <p> insertion
 
(7 intermediate revisions by 2 users not shown)
Line 1:
<div>{{#ifeq:{{{handler}}}|GC
|<!-- Start of GlobalCollect handling code -->
|<html>
<script type="text/javascript" language="javascript">
 
function redirectPayment(i) {
 
document.getElementsByName("currency_code")[0].value="</html>{{2011FR/core-currency-code|{{{country}}}}}<html>";
//************************************ 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>\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<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>";
}
Line 26 ⟶ 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 43 ⟶ 49:
 
//********************************** eWallets *******************************************
if (i=="pp"||i=="ew-pp") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 51 ⟶ 57:
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=="ew-pp-usd") {
paymentType = "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 63 ⟶ 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";
recurring.name = "recurring_paypal";
recurring.id = "recurring-hidden";
recurring.value = "true";
document.paypalcontribution.appendChild(recurring);
}
}
 
if (i=="rpp"||i=="ew-pprpp") {
paymentType= "pp";
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>";
Line 84 ⟶ 108:
}
 
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 **************************************
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 109 ⟶ 133:
 
// ************************Do not change without the permission of Faulkner***************************
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.';
 
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~'
+ if(getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + =='~')
document.paypalcontribution.utm_source.value += 'default' + '~';
+ getQuerystring( 'appeal' ).replace("Appeal-","") + '~'
else
+ getQuerystring( 'form-template' ).replace("Form-template-","") + '~'
document.paypalcontribution.utm_source.value += getQuerystring( 'form-countryspecifictemplate' ).replace("FormLp-countryspecificlayout-","") + '.~' ;
+ paymentType;
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' );
//document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_</html>{{2011FR/core-country-region|{{{country}}}}}<html>';
//****************************** End Faulkner ******************************************************
 
Line 132 ⟶ 176:
</script>
</html>
<!-- End of GlobalCollect handling code -->
|
<!-- Start of NON-GlobalCollect handling code -->
<html>
<script type="text/javascript" language="javascript">
function redirectPayment(i) {
 
Line 149 ⟶ 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 166 ⟶ 212:
recurring.value = "true";
document.paypalcontribution.appendChild(recurring);
}
document.paypalcontribution.action = action_url;
 
// ************************Do not change without the permission of Faulkner***************************
document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.'
+ getQuerystring( 'template' ).replace("Lp-layout-","") + '~'
+ getQuerystring( 'appeal-template' ).replace("Appeal-template-","") + '~'
Line 178 ⟶ 225:
+ paymentType;
 
document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' );
//document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' ) + '_</html>{{2011FR/core-country-region|{{{country}}}}}<html>';
//****************************** End Faulkner ******************************************************
 
Line 189 ⟶ 235:
</script>
</html>
<!-- End of NON-GlobalCollect handling code -->
}}
</div>

Latest revision as of 17:33, 24 January 2012