Index: trunk/extensions/DonationInterface/payflowpro_gateway/validate_input.js |
— | — | @@ -31,9 +31,9 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | function validate_form( form ) { |
35 | | - var msg = [ 'EmailAdd', 'Fname', 'Lname', 'Street', 'City', 'State', 'Zip', 'CardNum', 'Cvv', 'Amount' ]; |
| 35 | + var msg = [ 'EmailAdd', 'Fname', 'Lname', 'Street', 'City', 'State', 'Zip', 'CardNum', 'Cvv' ]; |
36 | 36 | |
37 | | - var fields = ["emailAdd","fname","lname","street","city","state","zip","card_num","cvv", "amount" ], |
| 37 | + var fields = ["emailAdd","fname","lname","street","city","state","zip","card_num","cvv" ], |
38 | 38 | numFields = fields.length, |
39 | 39 | i, |
40 | 40 | output = '', |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -852,6 +852,7 @@ |
853 | 853 | |
854 | 854 | $data = array( |
855 | 855 | 'amount' => ( $amount != "0.00" ) ? $amount : "30.00", |
| 856 | + 'amountOther' => '', |
856 | 857 | 'email' => 'test@example.com', |
857 | 858 | 'fname' => 'Tester', |
858 | 859 | 'mname' => 'T.', |
— | — | @@ -886,6 +887,7 @@ |
887 | 888 | } else { |
888 | 889 | $data = array( |
889 | 890 | 'amount' => $amount, |
| 891 | + 'amountOther' => $wgRequest->getText( 'amountOther' ), |
890 | 892 | 'email' => $wgRequest->getText( 'emailAdd' ), |
891 | 893 | 'fname' => $wgRequest->getText( 'fname' ), |
892 | 894 | 'mname' => $wgRequest->getText( 'mname' ), |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php |
— | — | @@ -115,14 +115,14 @@ |
116 | 116 | Xml::radio( 'amount', 100 ) . '100 ' . |
117 | 117 | Xml::radio( 'amount', 75 ) . '75 ' . |
118 | 118 | Xml::radio( 'amount', 35 ) . '35 ' . |
119 | | - Xml::radio( 'amount', -1, null, array( 'id' => 'otherRadio' ) ) . Xml::input( 'amountOther', '7', $this->form_data['amount'], array( 'type' => 'text', 'onfocus' => 'clearField( this, "0.00" )', 'onblur' => 'document.getElementById("otherRadio").value = this.value', 'maxlength' => '10', 'id' => 'amount' ) ) . |
120 | 119 | '<span class="creditcard-error-msg">' . ' ' . $this->form_errors['invalidamount'] . '</span></td>'; |
121 | 120 | $form .= '</tr>'; |
122 | 121 | |
123 | 122 | // currency |
124 | 123 | $form .= '<tr>'; |
125 | | - $form .= '<td class="label">' . Xml::label(wfMsg( 'payflowpro_gateway-donor-currency-label' ), 'currency' ) . '</td>'; |
126 | | - $form .= '<td>' . $this->generateCurrencyDropdown() . '</td>'; |
| 124 | + $form .= '<td class="label"></td>'; |
| 125 | + $form .= '<td>' . Xml::radio( 'amount', -1, null, array( 'id' => 'otherRadio' ) ) . Xml::input( 'amountOther', '7', $this->form_data['amountOther'], array( 'type' => 'text', 'onfocus' => 'clearField( this, "Other" )', 'onblur' => 'document.getElementById("otherRadio").value = this.value', 'maxlength' => '10', 'id' => 'amountOther' ) ) . |
| 126 | + ' ' . $this->generateCurrencyDropdown() . '</td>'; |
127 | 127 | $form .= '</tr>'; |
128 | 128 | |
129 | 129 | // card logos |
— | — | @@ -221,6 +221,7 @@ |
222 | 222 | <script type="text/javascript"> |
223 | 223 | var fname = document.getElementById('fname'); |
224 | 224 | var lname = document.getElementById('lname'); |
| 225 | +var amountOther = document.getElementById('amountOther'); |
225 | 226 | if (fname.value == '') { |
226 | 227 | fname.style.color = '#999999'; |
227 | 228 | fname.value = 'First'; |
— | — | @@ -229,6 +230,10 @@ |
230 | 231 | lname.style.color = '#999999'; |
231 | 232 | lname.value = 'Last'; |
232 | 233 | } |
| 234 | +if (amountOther.value == '') { |
| 235 | + amountOther.style.color = '#999999'; |
| 236 | + amountOther.value = 'Other'; |
| 237 | +} |
233 | 238 | </script> |
234 | 239 | EOT; |
235 | 240 | //$form .= $this->generateDonationFooter(); |