Difference between revisions 23742 and 24692 on donatewiki

{{MediaWiki:Resources/landingpage.css}}
{{MediaWiki:Resources/landingpage.js}}
<html>
  <style type="text/css">
    body {
      background: #e8e8e8;
    }
    div#mw-page-base,
(contracted; show full)        error = true;
      } 
      return !error;
    }
var redirectPayment = function(i) {
      //if i == 1
        var paymentType ="cc";
        var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=en\x26form_name=RapidH
TMLtml\x26ffname=cc-vmad\x26appeal=JimmyQuote" ;
      if (i==2) {
        action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/en";
        paymentType = "pp";
      } 
      document.paypalcontribution.action = action_url;
      document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' + getLandingPage() + '.' + paymentType;
      document.paypalcontribution.utm_campaign.value = getQuerystring( 'utm_campaign' );
      document.paypalcontribution.utm_medium.value = getQuerystring( 'utm_medium' );
      if (validateForm(document.paypalcontribution)) {
        document.paypalcontribution.submit();
      }
    }
var getLandingPage = function() {
  var path = "default";

  if( path == "default") {
    pathArray = window.location.pathname.split( '/' );
    return pathArray[2];
  }
  else {
   return path;
  }
}
  </script>
</html>