r99247 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99246‎ | r99247 | r99248 >
Date:20:28, 7 October 2011
Author:kaldari
Status:ok
Tags:fundraising 
Comment:
fixing scope issues for form_placeholders.js
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/form_placeholders.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/form_placeholders.js
@@ -1,20 +1,21 @@
22 //<![CDATA[
3 -function loadPlaceholders() {
4 - var fname = document.getElementById('fname');
5 - var lname = document.getElementById('lname');
6 - var amountOther = document.getElementById('amountOther');
7 - if (fname.value == '') {
8 - fname.style.color = '#999999';
9 - fname.value = mw.msg( 'payflowpro_gateway-donor-fname' );
10 - }
11 - if (lname.value == '') {
12 - lname.style.color = '#999999';
13 - lname.value = mw.msg( 'payflowpro_gateway-donor-lname' );
14 - }
15 -}
16 -addEvent( window, 'load', loadPlaceholders );
 3+( function( $ ) {
 4+ $(document).ready(function() {
 5+ var fname = document.getElementById('fname');
 6+ var lname = document.getElementById('lname');
 7+ var amountOther = document.getElementById('amountOther');
 8+ if (fname.value == '') {
 9+ fname.style.color = '#999999';
 10+ fname.value = mw.msg( 'payflowpro_gateway-donor-fname' );
 11+ }
 12+ if (lname.value == '') {
 13+ lname.style.color = '#999999';
 14+ lname.value = mw.msg( 'payflowpro_gateway-donor-lname' );
 15+ }
 16+ });
 17+})(jQuery);
1718
18 -function formCheck( ccform ) {
 19+window.formCheck = function( ccform ) {
1920 var msg = [ 'EmailAdd', 'Fname', 'Lname', 'Street', 'City', 'Zip', 'CardNum', 'Cvv' ];
2021
2122 var fields = ["emailAdd","fname","lname","street","city","zip","card_num","cvv" ],

Status & tagging log