Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -177,8 +177,11 @@ |
178 | 178 | $( "#change-amount" ).show(); |
179 | 179 | } |
180 | 180 | function validateAmount() { |
| 181 | + |
| 182 | + // TODO: THIS NEEDS TO BE REPLACED WITH KALDARI'S CURRENCIES |
181 | 183 | var minimums = { |
182 | | - 'USD' : 1 |
| 184 | + 'USD' : 1, |
| 185 | + 'CAD' : 1 |
183 | 186 | }; |
184 | 187 | var error = true; |
185 | 188 | var amount = $( 'input[name="amount"]' ).val(); // get the amount |
— | — | @@ -192,8 +195,7 @@ |
193 | 196 | error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
194 | 197 | |
195 | 198 | // Check amount is at least the minimum |
196 | | - var currency_code = 'USD'; // hard-coded for these forms and tests |
197 | | - $( 'input[name="currency_code"]' ).val( currency_code ); |
| 199 | + var currency_code = $( 'input[name="currency_code"]' ).val(); |
198 | 200 | if ( typeof( minimums[currency_code] ) == 'undefined' ) { |
199 | 201 | minimums[currency_code] = 1; |
200 | 202 | } |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -252,8 +252,11 @@ |
253 | 253 | $( "#change-amount" ).show(); |
254 | 254 | } |
255 | 255 | function validateAmount() { |
| 256 | + |
| 257 | + // TODO: THIS NEEDS TO BE REPLACED WITH KALDARI'S CURRENCIES |
256 | 258 | var minimums = { |
257 | | - 'USD' : 1 |
| 259 | + 'USD' : 1, |
| 260 | + 'CAD' : 1 |
258 | 261 | }; |
259 | 262 | var error = true; |
260 | 263 | var amount = $( 'input[name="amount"]' ).val(); // get the amount |
— | — | @@ -267,8 +270,7 @@ |
268 | 271 | error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
269 | 272 | |
270 | 273 | // Check amount is at least the minimum |
271 | | - var currency_code = 'USD'; // hard-coded for these forms and tests |
272 | | - $( 'input[name="currency_code"]' ).val( currency_code ); |
| 274 | + var currency_code = $( 'input[name="currency_code"]' ).val(); |
273 | 275 | if ( typeof( minimums[currency_code] ) == 'undefined' ) { |
274 | 276 | minimums[currency_code] = 1; |
275 | 277 | } |