Index: trunk/extensions/DonationInterface/payflowpro_gateway/validate_input.js |
— | — | @@ -21,6 +21,12 @@ |
22 | 22 | field.style.color = 'black'; |
23 | 23 | } |
24 | 24 | } |
| 25 | +function clearField2( field, defaultValue ) { |
| 26 | + if (field.value != defaultValue) { |
| 27 | + field.value = ''; |
| 28 | + field.style.color = 'black'; |
| 29 | + } |
| 30 | +} |
25 | 31 | |
26 | 32 | function switchToPayPal() { |
27 | 33 | document.getElementById('payflow-table-cc').style.display = 'none'; |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php |
— | — | @@ -102,10 +102,10 @@ |
103 | 103 | $form .= '</tr>'; |
104 | 104 | $form .= '<tr>'; |
105 | 105 | $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount' ) . '</td>'; |
106 | | - $form .= '<td>' . Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' . |
107 | | - Xml::radio( 'amount', 50, $this->form_data['amount'] == 50 ) . '50 ' . |
108 | | - Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' . |
109 | | - Xml::radio( 'amount', 20, $this->form_data['amount'] == 20, array( 'onfocus' => 'clearField( document.getElementById(\'amountOther\'), "Other" )' ) ) . '20 ' . |
| 106 | + $form .= '<td>' . Xml::radio( 'amount', 100, $this->form_data['amount'] == 100, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '100 ' . |
| 107 | + Xml::radio( 'amount', 50, $this->form_data['amount'] == 50, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '50 ' . |
| 108 | + Xml::radio( 'amount', 35, $this->form_data['amount'] == 35, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '35 ' . |
| 109 | + Xml::radio( 'amount', 20, $this->form_data['amount'] == 20, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '20 ' . |
110 | 110 | '</td>'; |
111 | 111 | $form .= '</tr>'; |
112 | 112 | $form .= '<tr>'; |