Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetterCA.php |
— | — | @@ -132,7 +132,13 @@ |
133 | 133 | $form .= $this->getZipField(); |
134 | 134 | |
135 | 135 | // country |
136 | | - $form .= $this->getCountryField(); |
| 136 | + $form .= '<tr>'; |
| 137 | + $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['country'] . '</span></td>'; |
| 138 | + $form .= '</tr>'; |
| 139 | + $form .= '<tr>'; |
| 140 | + $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-country' ), 'country' ) . '</td>'; |
| 141 | + $form .= '<td>' . $this->generateCountryDropdown( 124 ) . '</td>'; // Canada default |
| 142 | + $form .= '</tr>'; |
137 | 143 | |
138 | 144 | return $form; |
139 | 145 | } |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | * (see http://us.php.net/asort) |
139 | 139 | * @return string |
140 | 140 | */ |
141 | | - public function generateCountryDropdown() { |
| 141 | + public function generateCountryDropdown( $defaultCountry = 840 ) { |
142 | 142 | $country_options = ''; |
143 | 143 | |
144 | 144 | // create a new array of countries with potentially translated country names for alphabetizing later |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | if ( $this->form_data[ 'country' ] ) { |
155 | 155 | $selected = ( $iso_value == $this->form_data[ 'country' ] ) ? true : false; |
156 | 156 | } else { |
157 | | - $selected = ( $iso_value == 840 ) ? true : false; // Default to United States |
| 157 | + $selected = ( $iso_value == $defaultCountry ) ? true : false; // Default to United States |
158 | 158 | } |
159 | 159 | $country_options .= Xml::option( $full_name, $iso_value, $selected ); |
160 | 160 | } |