Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php |
— | — | @@ -15,27 +15,6 @@ |
16 | 16 | public function loadPlaceholders() { |
17 | 17 | global $wgOut; |
18 | 18 | |
19 | | - |
20 | | - $scriptVars = array( |
21 | | - 'payflowproGatewayErrorMsgJs' => wfMsg( 'donate_interface-error-msg-js' ), |
22 | | - 'payflowproGatewayErrorMsgEmail' => wfMsg( 'donate_interface-error-msg-email' ), |
23 | | - 'payflowproGatewayErrorMsgAmount' => wfMsg( 'donate_interface-error-msg-amount' ), |
24 | | - 'payflowproGatewayErrorMsgEmailAdd' => wfMsg( 'donate_interface-error-msg-emailAdd' ), |
25 | | - 'payflowproGatewayErrorMsgFname' => wfMsg( 'donate_interface-error-msg-fname' ), |
26 | | - 'payflowproGatewayErrorMsgLname' => wfMsg( 'donate_interface-error-msg-lname' ), |
27 | | - 'payflowproGatewayErrorMsgStreet' => wfMsg( 'donate_interface-error-msg-street' ), |
28 | | - 'payflowproGatewayErrorMsgCity' => wfMsg( 'donate_interface-error-msg-city' ), |
29 | | - 'payflowproGatewayErrorMsgState' => wfMsg( 'donate_interface-error-msg-state' ), |
30 | | - 'payflowproGatewayErrorMsgZip' => wfMsg( 'donate_interface-error-msg-zip' ), |
31 | | - 'payflowproGatewayErrorMsgCountry' => wfMsg( 'donate_interface-error-msg-country' ), |
32 | | - 'payflowproGatewayErrorMsgCardNum' => wfMsg( 'donate_interface-error-msg-card_num' ), |
33 | | - 'payflowproGatewayErrorMsgExpiration' => wfMsg( 'donate_interface-error-msg-expiration' ), |
34 | | - 'payflowproGatewayErrorMsgCvv' => wfMsg( 'donate_interface-error-msg-cvv' ), |
35 | | - 'payflowproGatewayCVVExplain' => wfMsg( 'donate_interface-cvv-explain' ), |
36 | | - ); |
37 | | - |
38 | | - $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) ); |
39 | | - |
40 | 19 | // form placeholder values |
41 | 20 | $first = wfMsg( 'donate_interface-donor-fname' ); |
42 | 21 | $last = wfMsg( 'donate_interface-donor-lname' ); |
Index: trunk/extensions/DonationInterface/gateway_common/GatewayForm.php |
— | — | @@ -145,28 +145,28 @@ |
146 | 146 | |
147 | 147 | if ( empty( $data['street'] ) ) { |
148 | 148 | |
149 | | - $error['street'] = 'dontate_interface-error-msg-street' ); |
| 149 | + $error['street'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-street' ) ); |
150 | 150 | |
151 | 151 | $this->setValidateFormResult( false ); |
152 | 152 | } |
153 | 153 | |
154 | 154 | if ( empty( $data['city'] ) ) { |
155 | 155 | |
156 | | - $error['city'] = 'dontate_interface-error-msg-city' ); |
| 156 | + $error['city'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-city' ) ); |
157 | 157 | |
158 | 158 | $this->setValidateFormResult( false ); |
159 | 159 | } |
160 | 160 | |
161 | 161 | if ( empty( $data['state'] ) ) { |
162 | 162 | |
163 | | - $error['state'] = 'dontate_interface-error-msg-state' ); |
| 163 | + $error['state'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-state' ) ); |
164 | 164 | |
165 | 165 | $this->setValidateFormResult( false ); |
166 | 166 | } |
167 | 167 | |
168 | 168 | if ( empty( $data['zip'] ) && $data['state'] != 'XX') { |
169 | 169 | |
170 | | - $error['zip'] = 'dontate_interface-error-msg-zip' ); |
| 170 | + $error['zip'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-zip' ) ); |
171 | 171 | |
172 | 172 | $this->setValidateFormResult( false ); |
173 | 173 | } |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | |
186 | 186 | if ( empty( $data['amount'] ) ) { |
187 | 187 | |
188 | | - $error['amount'] = 'dontate_interface-error-msg-amount' ); |
| 188 | + $error['amount'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-amount' ) ); |
189 | 189 | |
190 | 190 | $this->setValidateFormResult( false ); |
191 | 191 | } |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | ( ( float ) $this->convert_to_usd( $data['currency'], $data['amount'] ) < ( float ) $priceFloor || |
198 | 198 | ( float ) $this->convert_to_usd( $data['currency'], $data['amount'] ) > ( float ) $priceCeiling ) ) { |
199 | 199 | |
200 | | - $error['invalidamount'] = 'dontate_interface-error-msg-invalid-amount' ); |
| 200 | + $error['invalidamount'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-invalid-amount' ) ); |
201 | 201 | |
202 | 202 | $this->setValidateFormResult( false ); |
203 | 203 | } |
— | — | @@ -214,21 +214,21 @@ |
215 | 215 | |
216 | 216 | if ( empty( $data['card_num'] ) ) { |
217 | 217 | |
218 | | - $error['card_num'] = 'dontate_interface-error-msg-card_num' ); |
| 218 | + $error['card_num'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-card_num' ) ); |
219 | 219 | |
220 | 220 | $this->setValidateFormResult( false ); |
221 | 221 | } |
222 | 222 | |
223 | 223 | if ( empty( $data['cvv'] ) ) { |
224 | 224 | |
225 | | - $error['cvv'] = 'dontate_interface-error-msg-cvv' ); |
| 225 | + $error['cvv'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-cvv' ) ); |
226 | 226 | |
227 | 227 | $this->setValidateFormResult( false ); |
228 | 228 | } |
229 | 229 | |
230 | 230 | if ( empty( $data['expiration'] ) ) { |
231 | 231 | |
232 | | - $error['expiration'] = 'dontate_interface-error-msg-expiration' ); |
| 232 | + $error['expiration'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-expiration' ) ); |
233 | 233 | |
234 | 234 | $this->setValidateFormResult( false ); |
235 | 235 | } |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | } elseif ( preg_match( '/^6(?:011|5[0-9]{2})[0-9]{12}$/', $data['card_num'] ) ) { // discover |
245 | 245 | $data['card'] = 'discover'; |
246 | 246 | } else { // an invalid credit card number was entered |
247 | | - $error['card_num'] = 'dontate_interface-error-msg-card-num' ); |
| 247 | + $error['card_num'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-card-num' ) ); |
248 | 248 | |
249 | 249 | $this->setValidateFormResult( false ); |
250 | 250 | } |
— | — | @@ -261,7 +261,7 @@ |
262 | 262 | |
263 | 263 | if ( empty( $data['email'] ) ) { |
264 | 264 | |
265 | | - $error['email'] = 'dontate_interface-error-email-empty' ); |
| 265 | + $error['email'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-email-empty' ) ); |
266 | 266 | |
267 | 267 | $this->setValidateFormResult( false ); |
268 | 268 | } |
— | — | @@ -271,7 +271,7 @@ |
272 | 272 | |
273 | 273 | // create error message (supercedes empty field message) |
274 | 274 | if ( !$isEmail ) { |
275 | | - $error['email'] = 'dontate_interface-error-msg-email' ); |
| 275 | + $error['email'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-email' ) ); |
276 | 276 | |
277 | 277 | $this->setValidateFormResult( false ); |
278 | 278 | } |
— | — | @@ -289,14 +289,14 @@ |
290 | 290 | |
291 | 291 | if ( empty( $data['fname'] ) ) { |
292 | 292 | |
293 | | - $error['fname'] = 'dontate_interface-error-msg-fname' ); |
| 293 | + $error['fname'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-fname' ) ); |
294 | 294 | |
295 | 295 | $this->setValidateFormResult( false ); |
296 | 296 | } |
297 | 297 | |
298 | 298 | if ( empty( $data['lname'] ) ) { |
299 | 299 | |
300 | | - $error['lname'] = 'dontate_interface-error-msg-lname' ); |
| 300 | + $error['lname'] = wfMsg( 'donate_interface-error-msg', wfMsg( 'donate_interface-error-msg-lname' ) ); |
301 | 301 | |
302 | 302 | $this->setValidateFormResult( false ); |
303 | 303 | } |