Template:Footer/Links/Default: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
Cbarr (talk | contribs)
No edit summary
Cbarr (talk | contribs)
No edit summary
Line 53: Line 53:
var paramsOut = parseParams(window.location.href); // create an object with the current querystring parameters
var paramsOut = parseParams(window.location.href); // create an object with the current querystring parameters


if (showOnetimeLink) {
if (paramsOut['form-countryspecific'] == 'Form-countryspecific-monthly') {
// We're on a monthly page, fix up the onetime link and show that instead
// We're on a monthly page, fix up the onetime link and show that instead
paramsOut['form-countryspecific'] = 'Form-countryspecific-control';
paramsOut['form-countryspecific'] = 'Form-countryspecific-control';
document.getElementById('onetime-link').href = baseURL + $.param(paramsOut);
document.getElementById('onetime-link').href = baseURL + $.param(paramsOut);
$('#onetime-link').show();
$('#onetime-link').show();
} else if (showMonthlyLink) {
} else if (paramsOut['form-countryspecific'] == 'Form-countryspecific-recurring') {
// We're on a recurring page, hide both links
//$('#monthly-link').hide();
//$('#onetime-link').hide();
} else {
// We're not on a monthly page. So show a correct link to one.
// We're not on a monthly page. So show a correct link to one.
paramsOut['form-countryspecific'] = 'Form-countryspecific-monthly';
paramsOut['form-countryspecific'] = 'Form-countryspecific-monthly';

Revision as of 20:55, 30 January 2012