Index: trunk/extensions/DonationInterface/payflowpro_gateway/form_placeholders.js |
— | — | @@ -1,16 +1,13 @@ |
2 | 2 | //<![CDATA[ |
3 | 3 | ( function( $ ) { |
4 | 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' ); |
| 5 | + if ( $( '#fname' ).val() == '') { |
| 6 | + $( '#fname' ).css( 'color', '#999999' ); |
| 7 | + $( '#fname' ).val( mw.msg( 'payflowpro_gateway-donor-fname' ) ); |
11 | 8 | } |
12 | | - if (lname.value == '') { |
13 | | - lname.style.color = '#999999'; |
14 | | - lname.value = mw.msg( 'payflowpro_gateway-donor-lname' ); |
| 9 | + if ( $( '#lname' ).val() == '') { |
| 10 | + $( '#lname' ).css( 'color', '#999999' ); |
| 11 | + $( '#lname' ).val( mw.msg( 'payflowpro_gateway-donor-lname' ) ); |
15 | 12 | } |
16 | 13 | }); |
17 | 14 | })(jQuery); |
— | — | @@ -27,19 +24,19 @@ |
28 | 25 | for( i = 0; i < numFields; i++ ) { |
29 | 26 | if( document.getElementById( fields[i] ).value == '' ) { |
30 | 27 | currField = window['payflowproGatewayErrorMsg'+ msg[i]]; |
31 | | - output += payflowproGatewayErrorMsgJs + ' ' + currField + '.\\r\\n'; |
| 28 | + output += payflowproGatewayErrorMsgJs + ' ' + currField + '.\r\n'; |
32 | 29 | } |
33 | 30 | } |
34 | 31 | |
35 | 32 | if (document.getElementById('fname').value == '$first') { |
36 | | - output += payflowproGatewayErrorMsgJs + ' first name.\\r\\n'; |
| 33 | + output += payflowproGatewayErrorMsgJs + ' first name.\r\n'; |
37 | 34 | } |
38 | 35 | if (document.getElementById('lname').value == '$last') { |
39 | | - output += payflowproGatewayErrorMsgJs + ' last name.\\r\\n'; |
| 36 | + output += payflowproGatewayErrorMsgJs + ' last name.\r\n'; |
40 | 37 | } |
41 | 38 | var countryField = document.getElementById( 'country' ); |
42 | 39 | if( countryField.options[countryField.selectedIndex].value == '' ) { |
43 | | - output += payflowproGatewayErrorMsgJs + ' ' + window['payflowproGatewayErrorMsgCountry'] + '.\\r\\n'; |
| 40 | + output += payflowproGatewayErrorMsgJs + ' ' + window['payflowproGatewayErrorMsgCountry'] + '.\r\n'; |
44 | 41 | } |
45 | 42 | |
46 | 43 | // validate email address |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php |
— | — | @@ -180,7 +180,6 @@ |
181 | 181 | |
182 | 182 | // form placeholders |
183 | 183 | $wgResourceModules[ 'pfp.form.core.placeholders' ] = array( |
184 | | - 'position' => 'top', |
185 | 184 | 'scripts' => 'form_placeholders.js', |
186 | 185 | 'dependencies' => 'pfp.form.core.validate', |
187 | 186 | 'messages' => array( |