Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | |
61 | 61 | // If the form is being reloaded, restore the amount |
62 | 62 | var previousAmount = $( 'input[name="amount"]' ).val(); |
63 | | - if ( previousAmount ) { |
| 63 | + if ( previousAmount && previousAmount > 0 ) { |
64 | 64 | var matched = false; |
65 | 65 | $( 'input[name="amountRadio"]' ).each( function( index ) { |
66 | 66 | if ( $( this ).val() == previousAmount ) { |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/lightbox1.js |
— | — | @@ -7,6 +7,23 @@ |
8 | 8 | modal: true, |
9 | 9 | title: 'Donate by Credit Card' |
10 | 10 | } ); |
| 11 | + |
| 12 | + // If the form is being reloaded, restore the amount |
| 13 | + var previousAmount = $( 'input[name="amount"]' ).val(); |
| 14 | + if ( previousAmount && previousAmount > 0 ) { |
| 15 | + var matched = false; |
| 16 | + $( 'input[name="amountRadio"]' ).each( function( index ) { |
| 17 | + if ( $( this ).val() == previousAmount ) { |
| 18 | + $( this ).attr( 'checked', true ); |
| 19 | + matched = true; |
| 20 | + } |
| 21 | + } ); |
| 22 | + if ( !matched ) { |
| 23 | + $( 'input#input_amount_other' ).attr( 'checked', true ); |
| 24 | + $( 'input#other-amount' ).val( previousAmount ); |
| 25 | + } |
| 26 | + } |
| 27 | + |
11 | 28 | $( '#cc' ).click( function() { |
12 | 29 | if ( validateAmount( document.paypalcontribution ) ) { |
13 | 30 | $( '#dialog' ).dialog( 'open' ); |
Index: trunk/extensions/DonationInterface/gateway_forms/rapidhtml/js/lightbox1.js |
— | — | @@ -7,6 +7,23 @@ |
8 | 8 | modal: true, |
9 | 9 | title: 'Donate by Credit Card' |
10 | 10 | } ); |
| 11 | + |
| 12 | + // If the form is being reloaded, restore the amount |
| 13 | + var previousAmount = $( 'input[name="amount"]' ).val(); |
| 14 | + if ( previousAmount && previousAmount > 0 ) { |
| 15 | + var matched = false; |
| 16 | + $( 'input[name="amountRadio"]' ).each( function( index ) { |
| 17 | + if ( $( this ).val() == previousAmount ) { |
| 18 | + $( this ).attr( 'checked', true ); |
| 19 | + matched = true; |
| 20 | + } |
| 21 | + } ); |
| 22 | + if ( !matched ) { |
| 23 | + $( 'input#input_amount_other' ).attr( 'checked', true ); |
| 24 | + $( 'input#other-amount' ).val( previousAmount ); |
| 25 | + } |
| 26 | + } |
| 27 | + |
11 | 28 | $( '#cc' ).click( function() { |
12 | 29 | if ( validateAmount( document.paypalcontribution ) ) { |
13 | 30 | $( '#dialog' ).dialog( 'open' ); |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | |
61 | 61 | // If the form is being reloaded, restore the amount |
62 | 62 | var previousAmount = $( 'input[name="amount"]' ).val(); |
63 | | - if ( previousAmount ) { |
| 63 | + if ( previousAmount && previousAmount > 0 ) { |
64 | 64 | var matched = false; |
65 | 65 | $( 'input[name="amountRadio"]' ).each( function( index ) { |
66 | 66 | if ( $( this ).val() == previousAmount ) { |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/lightbox1.js |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | // If the form is being reloaded, restore the amount |
13 | 13 | var previousAmount = $( 'input[name="amount"]' ).val(); |
14 | | - if ( previousAmount ) { |
| 14 | + if ( previousAmount && previousAmount > 0 ) { |
15 | 15 | var matched = false; |
16 | 16 | $( 'input[name="amountRadio"]' ).each( function( index ) { |
17 | 17 | if ( $( this ).val() == previousAmount ) { |