Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | // we only want to load this JS if the form is being rendered |
12 | 12 | $this->loadValidateJs(); // validation JS |
13 | 13 | |
| 14 | + // form placeholder values |
14 | 15 | $first = wfMsg( 'payflowpro_gateway-first' ); |
15 | 16 | $last = wfMsg( 'payflowpro_gateway-last' ); |
16 | 17 | $js = <<<EOT |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php |
— | — | @@ -432,7 +432,7 @@ |
433 | 433 | protected function getAmountField() { |
434 | 434 | $otherChecked = false; |
435 | 435 | $amount = -1; |
436 | | - if ( $this->form_data['amount'] != 250 && $this->form_data['amount'] != 100 && $this->form_data['amount'] != 75 && $this->form_data['amount'] != 35 && $this->form_data['amountOther'] > 0 ) { |
| 436 | + if ( $this->form_data['amount'] != 100 && $this->form_data['amount'] != 50 && $this->form_data['amount'] != 35 && $this->form_data['amount'] != 20 && $this->form_data['amountOther'] > 0 ) { |
437 | 437 | $otherChecked = true; |
438 | 438 | $amount = $this->form_data['amountOther']; |
439 | 439 | } |
— | — | @@ -441,10 +441,10 @@ |
442 | 442 | $form .= '</tr>'; |
443 | 443 | $form .= '<tr>'; |
444 | 444 | $form .= '<td class="label">' . Xml::label(wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount') . '</td>'; |
445 | | - $form .= '<td>' . Xml::radio( 'amount', 250, $this->form_data['amount'] == 250 ) . '250 ' . |
446 | | - Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' . |
447 | | - Xml::radio( 'amount', 75, $this->form_data['amount'] == 75 ) . '75 ' . |
448 | | - Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' . |
| 445 | + $form .= '<td>' . Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' . |
| 446 | + Xml::radio( 'amount', 50, $this->form_data['amount'] == 50 ) . '50 ' . |
| 447 | + Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' . |
| 448 | + Xml::radio( 'amount', 20, $this->form_data['amount'] == 20 ) . '20 ' . |
449 | 449 | '</td>'; |
450 | 450 | $form .= '</tr>'; |
451 | 451 | $form .= '<tr>'; |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php |
— | — | @@ -15,7 +15,30 @@ |
16 | 16 | $this->loadValidateJs(); // validation JS |
17 | 17 | |
18 | 18 | $this->loadApiJs(); // API/Ajax JS |
| 19 | + |
| 20 | + // form placeholder values |
| 21 | + $first = wfMsg( 'payflowpro_gateway-first' ); |
| 22 | + $last = wfMsg( 'payflowpro_gateway-last' ); |
| 23 | + $js = <<<EOT |
| 24 | +<script type="text/javascript"> |
| 25 | +function loadPlaceholders() { |
| 26 | + var fname = document.getElementById('fname'); |
| 27 | + var lname = document.getElementById('lname'); |
| 28 | + var amountOther = document.getElementById('amountOther'); |
| 29 | + if (fname.value == '') { |
| 30 | + fname.style.color = '#999999'; |
| 31 | + fname.value = '$first'; |
19 | 32 | } |
| 33 | + if (lname.value == '') { |
| 34 | + lname.style.color = '#999999'; |
| 35 | + lname.value = '$last'; |
| 36 | + } |
| 37 | +} |
| 38 | +addEvent( window, 'load', loadPlaceholders ); |
| 39 | +</script> |
| 40 | +EOT; |
| 41 | + $wgOut->addHeadItem( 'placeholders', $js ); |
| 42 | + } |
20 | 43 | |
21 | 44 | /** |
22 | 45 | * Required method for constructing the entire form |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php |
— | — | @@ -110,7 +110,8 @@ |
111 | 111 | 'payflowpro_gateway-last' => 'Last', |
112 | 112 | 'payflowpro_gateway-noscript-msg' => 'It appears that you do not have JavaScript enabled, or your browser does not support it. |
113 | 113 | In order to provide a safe, secure and pleasant experience, our donation form requires JavaScript.', |
114 | | - 'payflowpro_gateway-noscript-redirect-msg' => 'If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:' |
| 114 | + 'payflowpro_gateway-noscript-redirect-msg' => 'If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:', |
| 115 | + 'payflowpro_gateway-anon-message' => 'Please list my name on the public donor list.' |
115 | 116 | ); |
116 | 117 | |
117 | 118 | /** Message documentation (Message documentation) |