Template:Ways to Give/PayPalSelect: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
No edit summary
greatly simplify - just use links instead of a form
Line 7: Line 7:
padding: 0 1em 0.5em 1em;
padding: 0 1em 0.5em 1em;
width: 15em;
width: 15em;
background: none;
}
}
</style>
</style>
<script>
<script>
function loadCountry(code){
$(document).ready(function() {
// Add tracking info to links
var newPage = "https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?uselang=</html>{{int:lang}}<html>&country=%COUNTRY%&utm_medium=Waystogive&utm_source=Waystogive&utm_campaign=C11_Waystogive";
$('#currency-list a').attr('href', function(i, val) {

newPage = newPage.replaceAll('amp;','');
var uri = new mw.Uri(val);
uri.extend({
newPage = newPage.replaceAll('%COUNTRY%',code);
utm_medium: 'Waystogive',
location.replace(newPage);
utm_campaign: 'C11_Waystogive',
}
utm_source: 'Waystogive'

});
function loadCurrency(code){
return uri.toString();
document.paypalcontribution.action = "https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?uselang=</html>{{int:lang}}<html>";
});
var currency = document.createElement("input");
});
currency.type = "hidden";
currency.name = "currency";
currency.value = code;
document.paypalcontribution.appendChild(currency);
document.paypalcontribution.referrer.value = document.referrer;
document.paypalcontribution.submit();
}
</script>
</script>


<form method="post" name="paypalcontribution">
<input type="hidden" name="language" value="</html>{{int:lang}}<html>" />
<input type="hidden" name="utm_source" value="Waystogive" />
<input type="hidden" name="utm_medium" value="Waystogive" />
<input type="hidden" name="utm_campaign" value="C11_Waystogive" />
<input type="hidden" name="referrer" value="" />
<input type="hidden" name="gateway" value="paypal"/>
<input type="hidden" name="language" value="</html>{{int:lang}}<html>" />
<input type="hidden" name="returnto" value="Thank_You/</html>{{int:lang}}<html>" />
<input type="hidden" name="email-opt" id="input_email" value="1" checked="checked" />
</form>
<div id="currency-list">
<a onclick="loadCurrency('USD')"></html>{{int:donate_interface-USD}}<html> (USD)</a>
<a onclick="loadCurrency('EUR')"></html>{{int:donate_interface-EUR}}<html> (EUR)</a>
<a onclick="loadCurrency('AUD')"></html>{{int:donate_interface-AUD}}<html> (AUD)</a>
<a onclick="loadCurrency('CAD')"></html>{{int:donate_interface-CAD}}<html> (CAD)</a>
<a onclick="loadCurrency('CHF')"></html>{{int:donate_interface-CHF}}<html> (CHF)</a>
<a onclick="loadCurrency('CZK')"></html>{{int:donate_interface-CZK}}<html> (CZK)</a>
<a onclick="loadCurrency('DKK')"></html>{{int:donate_interface-DKK}}<html> (DKK)</a>
<a onclick="loadCurrency('HKD')"></html>{{int:donate_interface-HKD}}<html> (HKD)</a>
<a onclick="loadCurrency('HUF')"></html>{{int:donate_interface-HUF}}<html> (HUF)</a>
<a onclick="loadCurrency('ILS')"></html>{{int:donate_interface-ILS}}<html> (ILS)</a>
<!--<a onclick="loadCurrency('JPY')"></html>{{int:donate_interface-JPY}}<html> (JPY)</a>-->
<a onclick="loadCurrency('MXN')"></html>{{int:donate_interface-MXN}}<html> (MXN)</a>
<a onclick="loadCurrency('NOK')"></html>{{int:donate_interface-NOK}}<html> (NOK)</a>
<a onclick="loadCurrency('NZD')"></html>{{int:donate_interface-NZD}}<html> (NZD)</a>
<a onclick="loadCurrency('PHP')"></html>{{int:donate_interface-PHP}}<html> (PHP)</a>
<a onclick="loadCurrency('PLN')"></html>{{int:donate_interface-PLN}}<html> (PLN)</a>
<a onclick="loadCurrency('GBP')"></html>{{int:donate_interface-GBP}}<html> (GBP)</a>
<a onclick="loadCurrency('THB')"></html>{{int:donate_interface-THB}}<html> (THB)</a>
<a onclick="loadCurrency('TWD')"></html>{{int:donate_interface-TWD}}<html> (TWD)</a>
</div>
<div style="clear: both;"></div>
</html>
</html>

<div id="currency-list">
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=USD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-USD}} (USD)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=EUR&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-EUR}} (EUR)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=AUD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-AUD}} (AUD)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=CAD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-CAD}} (CAD)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=CHF&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-CHF}} (CHF)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=CZK&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-CZK}} (CZK)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=DKK&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-DKK}} (DKK)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=HKD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-HKD}} (HKD)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=HUF&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-HUF}} (HUF)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=ILS&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-ILS}} (ILS)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=MXN&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-MXN}} (MXN)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=NOK&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-NOK}} (NOK)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=NZD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-NZD}} (NZD)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=PHP&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-PHP}} (PHP)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=PLN&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-PLN}} (PLN)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=GBP&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-GBP}} (GBP)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=THB&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-THB}} (THB)]
[https://payments.wikimedia.org/index.php/Special:GatewayFormChooser?currency=TWD&gateway=paypal&uselang={{pagelang}} {{int:donate_interface-TWD}} (TWD)]
</div>
<div style="clear: both;"></div>

Revision as of 17:40, 26 March 2015