Index: trunk/extensions/DonationInterface/donationinterface.php |
— | — | @@ -611,6 +611,7 @@ |
612 | 612 | 'donate_interface-error-msg-captcha', |
613 | 613 | 'donate_interface-error-msg-captcha-please', |
614 | 614 | 'donate_interface-error-msg-cookies', |
| 615 | + 'donate_interface-smallamount-error', |
615 | 616 | 'donate_interface-donor-fname', |
616 | 617 | 'donate_interface-donor-lname', |
617 | 618 | 'donate_interface-donor-street', |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | wgCurrencyMinimums[currency_code] = 1; |
230 | 230 | } |
231 | 231 | if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
232 | | - alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 232 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
233 | 233 | error = true; |
234 | 234 | } |
235 | 235 | return !error; |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd.html |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape']; |
8 | 8 | var actionURL = "@action"; |
9 | 9 | var scriptPath = "@script_path"; |
10 | | - var ajaxError = "%donate_interface-error-msg-general%"; |
11 | 10 | </script> |
12 | 11 | <!--[if lt IE 7]> |
13 | 12 | <script type="text/javascript"> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3stepB-US.html |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape']; |
8 | 8 | var actionURL = "@action"; |
9 | 9 | var scriptPath = "@script_path"; |
10 | | - var ajaxError = "%donate_interface-error-msg-general%"; |
11 | 10 | </script> |
12 | 11 | <!--[if lt IE 7]> |
13 | 12 | <script type="text/javascript"> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd-US.html |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape']; |
8 | 8 | var actionURL = "@action"; |
9 | 9 | var scriptPath = "@script_path"; |
10 | | - var ajaxError = "%donate_interface-error-msg-general%"; |
11 | 10 | </script> |
12 | 11 | <!--[if lt IE 7]> |
13 | 12 | <script type="text/javascript"> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3step.html |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape']; |
8 | 8 | var actionURL = "@action"; |
9 | 9 | var scriptPath = "@script_path"; |
10 | | - var ajaxError = "%donate_interface-error-msg-general%"; |
11 | 10 | </script> |
12 | 11 | <!--[if lt IE 7]> |
13 | 12 | <script type="text/javascript"> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3step-CA.html |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape']; |
8 | 8 | var actionURL = "@action"; |
9 | 9 | var scriptPath = "@script_path"; |
10 | | - var ajaxError = "%donate_interface-error-msg-general%"; |
11 | 10 | </script> |
12 | 11 | <!--[if lt IE 7]> |
13 | 12 | <script type="text/javascript"> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | wgCurrencyMinimums[currency_code] = 1; |
121 | 121 | } |
122 | 122 | if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
123 | | - alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 123 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
124 | 124 | error = true; |
125 | 125 | } |
126 | 126 | return !error; |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js |
— | — | @@ -44,13 +44,13 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | $( "#paymentContinueBtn" ).live( "click", function() { |
48 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 48 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
49 | 49 | displayCreditCardForm() |
50 | 50 | } |
51 | 51 | } ); |
52 | 52 | // Set the cards to progress to step 3 |
53 | 53 | $( ".cardradio" ).live( "click", function() { |
54 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 54 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
55 | 55 | displayCreditCardForm() |
56 | 56 | } |
57 | 57 | else { |
— | — | @@ -62,10 +62,14 @@ |
63 | 63 | |
64 | 64 | // init all of the header actions |
65 | 65 | $( "#step2header" ).click( function() { |
66 | | - showStep2(); |
| 66 | + if ( validateAmount() ) { |
| 67 | + showStep2(); |
| 68 | + } |
67 | 69 | } ); |
68 | 70 | $( "#step3header" ).click( function() { |
69 | | - displayCreditCardForm(); |
| 71 | + if ( validateAmount() ) { |
| 72 | + displayCreditCardForm(); |
| 73 | + } |
70 | 74 | } ); |
71 | 75 | |
72 | 76 | // check to see if amount was passed from the previous step |
— | — | @@ -140,7 +144,7 @@ |
141 | 145 | wgCurrencyMinimums[currency_code] = 1; |
142 | 146 | } |
143 | 147 | if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
144 | | - alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 148 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
145 | 149 | error = true; |
146 | 150 | } |
147 | 151 | return !error; |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js |
— | — | @@ -44,13 +44,13 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | $( "#paymentContinueBtn" ).live( "click", function() { |
48 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 48 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
49 | 49 | displayCreditCardForm() |
50 | 50 | } |
51 | 51 | } ); |
52 | 52 | // Set the cards to progress to step 3 |
53 | 53 | $( ".cardradio" ).live( "click", function() { |
54 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 54 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
55 | 55 | displayCreditCardForm() |
56 | 56 | } |
57 | 57 | else { |
— | — | @@ -62,10 +62,14 @@ |
63 | 63 | |
64 | 64 | // init all of the header actions |
65 | 65 | $( "#step2header" ).click( function() { |
66 | | - showStep2(); |
| 66 | + if ( validateAmount() ) { |
| 67 | + showStep2(); |
| 68 | + } |
67 | 69 | } ); |
68 | 70 | $( "#step3header" ).click( function() { |
69 | | - displayCreditCardForm(); |
| 71 | + if ( validateAmount() ) { |
| 72 | + displayCreditCardForm(); |
| 73 | + } |
70 | 74 | } ); |
71 | 75 | |
72 | 76 | // check to see if amount was passed from the previous step |
— | — | @@ -144,7 +148,7 @@ |
145 | 149 | wgCurrencyMinimums[currency_code] = 1; |
146 | 150 | } |
147 | 151 | if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
148 | | - alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 152 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
149 | 153 | error = true; |
150 | 154 | } |
151 | 155 | return !error; |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -107,13 +107,13 @@ |
108 | 108 | } |
109 | 109 | } ); |
110 | 110 | $( "#paymentContinueBtn" ).live( "click", function() { |
111 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 111 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
112 | 112 | displayCreditCardForm() |
113 | 113 | } |
114 | 114 | } ); |
115 | 115 | // Set the cards to progress to step 3 |
116 | 116 | $( ".cardradio" ).live( "click", function() { |
117 | | - if ( validate_personal( document.paypalcontribution ) ) { |
| 117 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
118 | 118 | displayCreditCardForm() |
119 | 119 | } else { |
120 | 120 | // show the continue button to indicate how to get to step 3 since they |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.js |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | 'type': 'GET', |
66 | 66 | 'success': function( data ) { |
67 | 67 | if ( typeof data.error !== 'undefined' ) { |
68 | | - alert( ajaxError ); |
| 68 | + alert( mw.msg( 'donate_interface-error-msg-general' ) ); |
69 | 69 | $( "#paymentContinue" ).show(); // Show continue button in 2nd section |
70 | 70 | showStep2(); |
71 | 71 | } else if ( typeof data.result !== 'undefined' ) { |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | } |
90 | 90 | }, |
91 | 91 | 'error': function( xhr ) { |
92 | | - alert( ajaxError ); |
| 92 | + alert( mw.msg( 'donate_interface-error-msg-general' ) ); |
93 | 93 | showStep1(); |
94 | 94 | } |
95 | 95 | } ); |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | wgCurrencyMinimums[currency_code] = 1; |
126 | 126 | } |
127 | 127 | if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
128 | | - alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 128 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
129 | 129 | error = true; |
130 | 130 | } |
131 | 131 | return !error; |