Index: trunk/extensions/DonationInterface/gateway_forms/rapidhtml/html/globalcollect_test.html |
— | — | @@ -8,9 +8,7 @@ |
9 | 9 | |
10 | 10 | <script type="text/javascript"> |
11 | 11 | function formCheck( ccform ) { |
12 | | - var msg = [ 'EmailAdd', 'Fname', 'Lname', 'Street', 'City', 'Zip' ]; |
13 | | - |
14 | | - var fields = ["emailAdd","fname","lname","street","city","zip" ], |
| 12 | + var fields = ['emailAdd','fname','lname','street','city','zip'], |
15 | 13 | numFields = fields.length, |
16 | 14 | i, |
17 | 15 | output = '', |
— | — | @@ -18,30 +16,30 @@ |
19 | 17 | |
20 | 18 | for( i = 0; i < numFields; i++ ) { |
21 | 19 | if( document.getElementById( fields[i] ).value == '' ) { |
22 | | - currField = window['payflowproGatewayErrorMsg'+ msg[i]]; |
23 | | - output += payflowproGatewayErrorMsgJs + ' ' + currField + '.\r\n'; |
| 20 | + currField = mw.msg( 'donate_interface-error-msg-' + fields[i] ); |
| 21 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + currField + '.\r\n'; |
24 | 22 | } |
25 | 23 | } |
26 | 24 | |
27 | 25 | if (document.getElementById('fname').value == '$first') { |
28 | | - output += payflowproGatewayErrorMsgJs + ' first name.\r\n'; |
| 26 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' first name.\r\n'; |
29 | 27 | } |
30 | 28 | if (document.getElementById('lname').value == '$last') { |
31 | | - output += payflowproGatewayErrorMsgJs + ' last name.\r\n'; |
| 29 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' last name.\r\n'; |
32 | 30 | } |
33 | 31 | if (document.getElementById('street').value == '$street') { |
34 | | - output += payflowproGatewayErrorMsgJs + ' street address.\r\n'; |
| 32 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' street address.\r\n'; |
35 | 33 | } |
36 | 34 | if (document.getElementById('city').value == '$city') { |
37 | | - output += payflowproGatewayErrorMsgJs + ' city.\r\n'; |
| 35 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' city.\r\n'; |
38 | 36 | } |
39 | 37 | if (document.getElementById('zip').value == '$zip') { |
40 | | - output += payflowproGatewayErrorMsgJs + ' zip code.\r\n'; |
| 38 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' zip code.\r\n'; |
41 | 39 | } |
42 | 40 | |
43 | 41 | var stateField = document.getElementById( 'state' ); |
44 | 42 | if( stateField.options[stateField.selectedIndex].value == '' ) { |
45 | | - output += payflowproGatewayErrorMsgJs + ' ' + window['payflowproGatewayErrorMsgState'] + '.\r\n'; |
| 43 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + mw.msg( 'donate_interface-error-msg-state' ) + '.\r\n'; |
46 | 44 | } |
47 | 45 | |
48 | 46 | // validate email address |
— | — | @@ -49,7 +47,7 @@ |
50 | 48 | var dotpos = document.payment.emailAdd.value.lastIndexOf("."); |
51 | 49 | |
52 | 50 | if( apos < 1 || dotpos-apos < 2 ) { |
53 | | - output += payflowproGatewayErrorMsgEmail; |
| 51 | + output += mw.msg( 'donate_interface-error-msg-email' ); |
54 | 52 | } |
55 | 53 | |
56 | 54 | if( output ) { |
Index: trunk/extensions/DonationInterface/gateway_forms/rapidhtml/js/globalcollect_test_2.js |
— | — | @@ -24,9 +24,7 @@ |
25 | 25 | }); |
26 | 26 | |
27 | 27 | window.formCheck = function( ccform ) { |
28 | | - var msg = [ 'EmailAdd', 'Fname', 'Lname', 'Street', 'City', 'Zip' ]; |
29 | | - |
30 | | - var fields = ["emailAdd","fname","lname","street","city","zip" ], |
| 28 | + var fields = ['emailAdd','fname','lname','street','city','zip'], |
31 | 29 | numFields = fields.length, |
32 | 30 | i, |
33 | 31 | output = '', |
— | — | @@ -34,30 +32,30 @@ |
35 | 33 | |
36 | 34 | for( i = 0; i < numFields; i++ ) { |
37 | 35 | if( document.getElementById( fields[i] ).value == '' ) { |
38 | | - currField = window['payflowproGatewayErrorMsg'+ msg[i]]; |
39 | | - output += payflowproGatewayErrorMsgJs + ' ' + currField + '.\r\n'; |
| 36 | + currField = mw.msg( 'donate_interface-error-msg-' + fields[i] ); |
| 37 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + currField + '.\r\n'; |
40 | 38 | } |
41 | 39 | } |
42 | 40 | |
43 | 41 | if (document.getElementById('fname').value == '$first') { |
44 | | - output += payflowproGatewayErrorMsgJs + ' first name.\r\n'; |
| 42 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' first name.\r\n'; |
45 | 43 | } |
46 | 44 | if (document.getElementById('lname').value == '$last') { |
47 | | - output += payflowproGatewayErrorMsgJs + ' last name.\r\n'; |
| 45 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' last name.\r\n'; |
48 | 46 | } |
49 | 47 | if (document.getElementById('street').value == '$street') { |
50 | | - output += payflowproGatewayErrorMsgJs + ' street address.\r\n'; |
| 48 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' street address.\r\n'; |
51 | 49 | } |
52 | 50 | if (document.getElementById('city').value == '$city') { |
53 | | - output += payflowproGatewayErrorMsgJs + ' city.\r\n'; |
| 51 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' city.\r\n'; |
54 | 52 | } |
55 | 53 | if (document.getElementById('zip').value == '$zip') { |
56 | | - output += payflowproGatewayErrorMsgJs + ' zip code.\r\n'; |
| 54 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' zip code.\r\n'; |
57 | 55 | } |
58 | 56 | |
59 | 57 | var stateField = document.getElementById( 'state' ); |
60 | 58 | if( stateField.options[stateField.selectedIndex].value == '' ) { |
61 | | - output += payflowproGatewayErrorMsgJs + ' ' + window['payflowproGatewayErrorMsgState'] + '.\r\n'; |
| 59 | + output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + mw.msg( 'donate_interface-error-msg-state' ) + '.\r\n'; |
62 | 60 | } |
63 | 61 | |
64 | 62 | // validate email address |
— | — | @@ -65,7 +63,7 @@ |
66 | 64 | var dotpos = document.payment.emailAdd.value.lastIndexOf("."); |
67 | 65 | |
68 | 66 | if( apos < 1 || dotpos-apos < 2 ) { |
69 | | - output += payflowproGatewayErrorMsgEmail; |
| 67 | + output += mw.msg( 'donate_interface-error-msg-email' ); |
70 | 68 | } |
71 | 69 | |
72 | 70 | if( output ) { |