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

From Donate
Jump to navigation Jump to search
Content deleted Content added
testing simplifed version
Undo revision 17994 by Pcoombe (talk)
Line 37: Line 37:
var monthlyURL = window.location.href;
var monthlyURL = window.location.href;
var pageCountrySpecific = getQuerystring( 'form-countryspecific' );
var pageCountrySpecific = getQuerystring( 'form-countryspecific' );
monthlyURL = monthlyURL.replace(pageCountrySpecific,'Form-countryspecific-monthly');
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<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;
document.getElementById("monthly-link").href = monthlyURL;
</script>
</script>

Revision as of 22:38, 25 January 2012