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

Content deleted Content added
clean up code, rm unused markers & css, convert divs to a list, add default link targets just in case js breaks
mNo edit summary
Line 16:
}
</style>
<!-- This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page -->
<script type="text/javascript">
var monthlyURL = window.location.href;
var pageCountrySpecific = getQuerystring( 'form-countryspecific' );
if (pageCountrySpecific == "") {
// if on a static page, e.g. from sidebar just use a monthly form and leave everything else as defaults
// Need to fix this later to pass language, utm data etc, but that stupid ampersand bug is stopping me for now -- Pcoombe
monthlyURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?form-countryspecific=Form-countryspecific-monthly&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>';
} else {
// if on Special:FundraiserLandingPage, use all the same querystring but a monthly form
monthlyURL = monthlyURL.replace(pageCountrySpecific,'Form-countryspecific-monthly');
document.getElementById("monthly-link").href = monthlyURL;
</script>
<!-- ----------------- end script--------------- -->
<ul class="form-info-links">
<li><a id="monthly-link" target="_blank" href="https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?form-countryspecific=Form-countryspecific-monthly&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>"></html>{{int:donate_interface-monthly-donation}}<html></a></li>
Line 48 ⟶ 33:
<li><a id="problems-link" target="_blank" href="https://wikimediafoundation.org/wiki/Problems_donating?country=</html>{{{country}}}<html>?language=</html>{{int:lang}}<html>"></html>{{int:Donate_interface-problemsdonating}}<html></a></li>
</ul>
<!-- This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page -->
 
<script type="text/javascript">
var monthlyURL = window.location.href;
var pageCountrySpecific = getQuerystring( 'form-countryspecific' );
if (pageCountrySpecific == "") {
// if on a static page, e.g. from sidebar just use a monthly form and leave everything else as defaults
// Need to fix this later to pass language, utm data etc, but that stupid ampersand bug is stopping me for now -- Pcoombe
monthlyURL = 'https://donate.wikimedia.org/wiki/Special:FundraiserLandingPage?form-countryspecific=Form-countryspecific-monthly&country=</html>{{{country}}}<html>&language=</html>{{int:lang}}<html>';
} else {
// if on Special:FundraiserLandingPage, use all the same querystring but a monthly form
monthlyURL = monthlyURL.replace(pageCountrySpecific,'Form-countryspecific-monthly');
document.getElementById("monthly-link").href = monthlyURL;
</script>
<!-- ----------------- end script--------------- -->
</html>