Template:2011FR/lp-form-GB-DDOptimised-GiftAid2

 white-space: nowrap; } fieldset { border: 1px solid #5EAC58; } padding: 4px 12px; cursor: pointer; }
 * 1) amount-box td {
 * 1) donate-buttons input {

       

 

 

 

 <label for="frequency-type-Q">  </a>

<fieldset class="donate-body-small"> <legend style="font-weight: bold; font-size: 100%;">Make your donation go 25% further with Gift Aid: <input type="checkbox" name="giftaid-opt" id="input_giftaid" /> <label for="input_giftaid">I am a UK taxpayer. Please claim Gift Aid on all donations I have made to Wikimedia UK since 3 November 2011 and in future.

By asking us to claim Gift Aid on your donations, you agree that you pay more UK Income Tax or Capital Gains Tax than the value of the tax we reclaim on your gifts. We will use the address you supply us while making your donation for our Gift Aid records. If your circumstances or address change please let us know.

You can find out more about Gift Aid</a> on the HMRC website. <input type="button" id="paypal-donate-button" value=" " onclick="submitForm('PayPal');" style="display: none;" /> <input type="button" id="dd-donate-button" value=" " onclick="submitForm('DirectDebit');" />

<input type="checkbox" name="email-opt" id="input_email" checked="checked" /> <label for="input_email">

<script type="text/javascript"> var wmh_paypal = document.getElementById('wmh_paypal');

function changeType(donationType) { if (donationType === 'regular') { // DirectDebit mode $('#oneoff-amount-options').hide; $('#regular-amount-options').show; $('#dd-donate-button').show; $('#paypal-donate-button').hide; wmh_paypal.action = 'https://donate.wikimedia.org.uk/dd/index.php'; } else { // Oneoff mode $('#oneoff-amount-options').show; $('#regular-amount-options').hide; $('#dd-donate-button').hide; $('#paypal-donate-button').show; wmh_paypal.action = 'https://www.paypal.com/cgi-bin/webscr'; } // Reset selected amount for ( var i = 0; i < wmh_paypal.amount.length; i++ ) { wmh_paypal.amount[i].checked = ""; } }

function validateForm(type) { var amount = null; for ( var i = 0; i < wmh_paypal.amount.length; i++ ) { if ( wmh_paypal.amount[i].checked ) { amount = wmh_paypal.amount[i].value; } }  if (amount == null || amount < 1) { alert(' '.replace('$1', '£1') ); return false; } else if ( !( !(amount>250) || !(type=='DirectDebit') ) ) { alert('Sorry, you can not donate more than £250 by Direct Debit. Please contact fundraising@wikimedia.org.uk if you have questions.'); return false; } else { return true; } }

function submitForm(type) { if ( validateForm(type) ) { var check_email = document.getElementById('input_email'); var check_giftaid = document.getElementById('input_giftaid'); var infostring = getQuerystring( 'utm_medium' ) + '.' + getQuerystring( 'utm_campaign' ) + '.' + getQuerystring( 'utm_source' ) + '.' + getLandingPage + '.email=' + check_email.checked + '.giftaid=' + check_giftaid.checked; if (type == 'DirectDebit') { wmh_paypal.Payer_reference.value = infostring; wmh_paypal.action = 'https://donate.wikimedia.org.uk/dd/index.php'; } else { wmh_paypal.custom.value = infostring wmh_paypal.action = 'https://www.paypal.com/cgi-bin/webscr'; }   wmh_paypal.submit; } }

function getQuerystring( key ) { key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ); var regex = new RegExp( '[\\?&]' + key + '=([a-zA-Z0-9\_\-]*)' ); var qs = regex.exec( window.location.search ); return qs == null ? '' : qs[1]; }

function getLandingPage { var path = " ";

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

jQuery(document).ready( function( $ ) { changeType('regular') } );