Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -1031,7 +1031,7 @@ |
1032 | 1032 | 'city2' => $wgRequest->getText( 'city' ), |
1033 | 1033 | 'state2' => $wgRequest->getText( 'state' ), |
1034 | 1034 | 'zip2' => $wgRequest->getText( 'zip' ), |
1035 | | - 'country2' => $wgRequest->getText( 'country' ), |
| 1035 | + 'country2' => $wgRequest->getText( 'country2', $wgRequest->getText( 'country' ) ), |
1036 | 1036 | 'size' => $wgRequest->getText( 'size' ), |
1037 | 1037 | 'premium_language' => $wgRequest->getText( 'premium_language', "en" ), |
1038 | 1038 | 'card_num' => str_replace( ' ', '', $wgRequest->getText( 'card_num' ) ), |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php |
— | — | @@ -624,13 +624,13 @@ |
625 | 625 | return $form; |
626 | 626 | } |
627 | 627 | |
628 | | - protected function getCountryField() { |
| 628 | + protected function getCountryField( $defaultCountry = null ) { |
629 | 629 | $form = '<tr>'; |
630 | 630 | $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['country'] . '</span></td>'; |
631 | 631 | $form .= '</tr>'; |
632 | 632 | $form .= '<tr>'; |
633 | 633 | $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-country' ), 'country' ) . '</td>'; |
634 | | - $form .= '<td>' . $this->generateCountryDropdown() . '</td>'; |
| 634 | + $form .= '<td>' . $this->generateCountryDropdown( $defaultCountry ) . '</td>'; |
635 | 635 | $form .= '</tr>'; |
636 | 636 | return $form; |
637 | 637 | } |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnPremium.php |
— | — | @@ -142,7 +142,24 @@ |
143 | 143 | $form .= $this->getZipField(); |
144 | 144 | |
145 | 145 | // country |
146 | | - $form .= $this->getCountryField(); |
| 146 | + $form .= $this->getCountryField( $this->form_data[ 'country2' ] ); |
| 147 | + |
| 148 | + /* |
| 149 | + $form .= '<tr>'; |
| 150 | + $form .= '<td colspan="2"><span class="creditcard-error-msg"></span></td>'; |
| 151 | + $form .= '</tr>'; |
| 152 | + $form .= '<tr>'; |
| 153 | + $form .= '<td colspan="2"><label for="shipping"><input id="shipping" name="shipping" type="checkbox" checked="checked"/> '.wfMsg( 'payflowpro_gateway-shipping-address-same' ).'</label></td>'; |
| 154 | + $form .= '</tr>'; |
| 155 | + |
| 156 | + $form .= '<tr>'; |
| 157 | + $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['country2'] . '</span></td>'; |
| 158 | + $form .= '</tr>'; |
| 159 | + $form .= '<tr>'; |
| 160 | + $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-country' ), 'country2' ) . '</td>'; |
| 161 | + $form .= '<td>' . $this->generateCountryDropdown() . '</td>'; |
| 162 | + $form .= '</tr>'; |
| 163 | + */ |
147 | 164 | |
148 | 165 | return $form; |
149 | 166 | } |
— | — | @@ -157,6 +174,9 @@ |
158 | 175 | foreach ( $hidden_fields as $field => $value ) { |
159 | 176 | $form .= Html::hidden( $field, $value ); |
160 | 177 | } |
| 178 | + |
| 179 | + // Temporary |
| 180 | + $form .= Html::hidden( 'country2', $this->form_data[ 'country2' ] ); |
161 | 181 | |
162 | 182 | $form .= Xml::closeElement( 'form' ); // close form 'payment' |
163 | 183 | $form .= $this->generateDonationFooter(); |