Template:2012France/lp-form: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1:
<html>
▲<script type="text/javascript" language="javascript">
/* Conversion des virgules en points, interdiction des lettres */
function verificationsaisie() {
var amountGiven = document.getElementById('amountGiven');
var firstChar = amountGiven.value.charAt(0);
if (('1' > firstChar) || ('9' < firstChar))
amountGiven.value = amountGiven.value.substr(1);
amountGiven.value = amountGiven.value.replace(/[^0-9.,]/g, '').replace(/^([0-9]*[.,][0-9]*)[.,]*/g, '$1');
amountGiven.value = amountGiven.value.replace(/,/, '.');
return;
}
Line 36 ⟶ 35:
error = true;
}
document.
return !error;
}
function redirectPayment(i) {
var action_url = "</html>{{{donate-url}}}<html>" ;▼
▲ paymentType = "pp";
}▼
if
▲ document.paypalcontribution.action = action_url;
▲ document.paypalcontribution.utm_source.value = getQuerystring( 'utm_source' ) + '.' + getLandingPage() + '.' + paymentType;
▲ if(validateForm(document.paypalcontribution)){
▲ if(typeof(OWA) !== 'undefined'){OWATracker.shareStateByPost( document.paypalcontribution );}
▲ document.paypalcontribution.submit();
}
</script>
<form method="post" name="
<input type="hidden" name="gateway" value="paypal" />
<input type="hidden" name="utm_source" value="" />
Line 66 ⟶ 61:
<input type="hidden" name="returnto" value="Thank_You/</html>{{{language|{{SUBPAGENAME}}}}}<html>" />
<input type="hidden" name="amount" />▼
<div style="padding: 0.1em 0em; font-weight: normal; text-align:center;"> ▼
</html>{{{gift-amount-text}}}<html><br /><br />▼
<div id="amount-box" style="font-size: 100%; padding: 0; font-weight:bold;margin-left: -5px; ">▼
<table id="amount-table">▼
<td style="white-space:nowrap;text-align:justify;"><input type="radio" name="input_amount" id="input_amount_0" onclick="document.paypalcontribution. amountGiven.value = ''" style="text-align:justify;" value="</html>{{{donate-amount-0}}}<html>"><label for="input_amount_0"> </html>{{{donate-amount-0}}}<html> €</label></td>▼
<td style="white-space:nowrap;text-align:justify;"><input type="radio" name="input_amount" id="input_amount_1" onclick="document.paypalcontribution. amountGiven.value = ''" value="</html>{{{donate-amount-1}}}<html>"><label for="input_amount_1"> </html>{{{donate-amount-1}}}<html> €</label></td>▼
<td style="white-space:nowrap;text-align:justify;"><input type="radio" name="input_amount" id="input_amount_2" onclick="document.paypalcontribution. amountGiven.value = ''" value="</html>{{{donate-amount-2}}}<html>"><label for="input_amount_2"> </html>{{{donate-amount-2}}}<html> €</label></td>▼
</tr>▼
<td style="white-space:nowrap;text-align:justify;"><input type="radio" name="input_amount" id="input_amount_3" onclick="document.paypalcontribution. amountGiven.value = ''" value="</html>{{{donate-amount-3}}}<html>"><label for="input_amount_3"> </html>{{{donate-amount-3}}}<html> €</label></td>▼
<td style="white-space:nowrap;text-align:justify;"><input type="radio" name="input_amount" id="input_amount_other" value="Other"><label for="input_amount_other"></html>{{{donate-amount-other|<html>Other:</html>}}}<html></label> <input type="text" name="amountGiven" id="amountGiven" size="4" onKeyUp="verificationsaisie()" onfocus="this.form.input_amount_other.checked=true;"> €<br/></td>▼
</table>▼
</div></html>{{{gift-amount-text-suite}}}<html></div>▼
▲<input type="hidden" name="amount" />
<div id="cc-donate-button" align="center">▼
<input type="button" value="</html>{{{donate-label}}}<html>" style="background-color:</html>{{{button-color}}}<html>;font-weight:bold; font-size:125%;padding: 0.5em 0.5em;" onclick="redirectPayment('1');" title="Faire un don !" alt="Faire un don !"/>▼
▲<input name="COMPLUS" value="WikimediaFoundation" type="hidden">
</div>▼
<small>{{{chapter-text|}}}</small>▼
</div>▼
▲ </html>{{{gift-amount-text}}}<html><br /><br />
▲ <table id="amount-table">
<tr>
▲ <td style="white-space: nowrap; text-align:justify;"><input type="radio" name="input_amount" id="input_amount_0" onclick="document.
▲ <td style="white-space: nowrap; text-align:justify;"><input type="radio" name="input_amount" id="input_amount_1" onclick="document.
▲ <td style="white-space: nowrap; text-align:justify;"><input type="radio" name="input_amount" id="input_amount_2" onclick="document.
</tr>
<tr>
▲ <td style="white-space: nowrap; text-align:justify;"><input type="radio" name="input_amount" id="input_amount_3" onclick="document.
▲ <td style="white-space: nowrap; text-align:justify;"><input type="radio" name="input_amount" id="input_amount_other" value="Other"><label for="input_amount_other"></html>{{{donate-amount-other|<html>Other:</html>}}}<html></label> <input type="text" name="amountGiven" id="amountGiven" size="4" onKeyUp="verificationsaisie();" onfocus="this.form.input_amount_other.checked=true;"> €<br/></td>
</tr>
▲ </table>
</div>
▲ </div>
▲ <div id="cc-donate-button" align="center">
▲ <input type="button" value="</html>{{{donate-label}}}<html>" style="background-color: </html>{{{button-color}}}<html>; font-weight: bold; font-size: 125%; padding: 0.5em 0.5em;" onclick="redirectPayment('1');" title="Faire un don !" alt="Faire un don !"/>
▲ </div>
<script type="text/javascript">
function getQuerystring( key ) {
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' );
var regex = new RegExp( '[\\?&]' + key + '=([a-zA-Z0-9\_\-]*)' );
Line 104 ⟶ 97:
}
function getLandingPage() {
}
document.contribform.utm_medium.value = getQuerystring( 'utm_medium' );
document.
document.
</script>
|
Latest revision as of 14:54, 17 October 2012