r76903 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76902‎ | r76903 | r76904 >
Date:20:53, 17 November 2010
Author:kaldari
Status:deferred
Tags:
Comment:
canada default
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetterCA.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetterCA.php
@@ -132,7 +132,13 @@
133133 $form .= $this->getZipField();
134134
135135 // 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>';
137143
138144 return $form;
139145 }
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -137,7 +137,7 @@
138138 * (see http://us.php.net/asort)
139139 * @return string
140140 */
141 - public function generateCountryDropdown() {
 141+ public function generateCountryDropdown( $defaultCountry = 840 ) {
142142 $country_options = '';
143143
144144 // create a new array of countries with potentially translated country names for alphabetizing later
@@ -153,7 +153,7 @@
154154 if ( $this->form_data[ 'country' ] ) {
155155 $selected = ( $iso_value == $this->form_data[ 'country' ] ) ? true : false;
156156 } else {
157 - $selected = ( $iso_value == 840 ) ? true : false; // Default to United States
 157+ $selected = ( $iso_value == $defaultCountry ) ? true : false; // Default to United States
158158 }
159159 $country_options .= Xml::option( $full_name, $iso_value, $selected );
160160 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r76904Merging from r76840 thru r76903 of trunkawjrichards20:58, 17 November 2010

Status & tagging log