r103537 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103536‎ | r103537 | r103538 >
Date:00:28, 18 November 2011
Author:kaldari
Status:ok
Tags:
Comment:
payflowpro lightbox form
Modified paths:
  • /trunk/extensions/DonationInterface/donationinterface.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/interface.i18n.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/Form.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/rapidhtml/RapidHtmlResources.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/css/lightbox1.css (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/html/lightbox1.html (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/lightbox1.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donationinterface.php
@@ -585,8 +585,11 @@
586586
587587 $wgResourceModules[ 'ext.donationInterface.errorMessages' ] = array(
588588 'messages' => array(
 589+ 'donate_interface-noscript-msg',
 590+ 'donate_interface-noscript-redirect-msg',
589591 'donate_interface-error-msg-general',
590592 'donate_interface-error-msg-js',
 593+ 'donate_interface-error-msg-validation',
591594 'donate_interface-error-msg-invalid-amount',
592595 'donate_interface-error-msg-email',
593596 'donate_interface-error-msg-card-num',
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/html/lightbox1.html
@@ -16,13 +16,13 @@
1717 <div id="donate">
1818 <noscript>
1919 <div id="noscript">
20 - <p id="noscript-msg">It appears that you do not have JavaScript enabled, or your browser does not support it. In order to provide a safe, secure and pleasant experience, our donation form requires JavaScript.</p><p id="noscript-redirect-msg">If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:</p><p id="noscript-redirect-link"><a href="http://wikimediafoundation.org/wiki/DonateNonJS/en">http://wikimediafoundation.org/wiki/DonateNonJS/en</a></p>
 20+ <p id="noscript-msg">%donate_interface-noscript-msg%</p>
 21+ <p id="noscript-redirect-msg">%donate_interface-noscript-redirect-msg%</p>
 22+ <p id="noscript-redirect-link"><a href="http://wikimediafoundation.org/wiki/DonateNonJS/en">http://wikimediafoundation.org/wiki/DonateNonJS/en</a></p>
2123 </div>
2224 </noscript>
23 -
 25+ <div id="topError" class="creditcard-error-msg"></div>
2426 <h3 id="amount-heading">%donate_interface-amount-legend%</h3>
25 -
26 - <p id="topError" class="creditcard-error-msg"></p>
2727 <form method="post" name="paypalcontribution">
2828 <div style="display: block;" id="amount-content">
2929 <div id="amtErrorMessages" class="small"></div>
@@ -42,37 +42,37 @@
4343 </table>
4444
4545 <p class="donate-options">
46 - <input class="btn" id="cc" value="%donate_interface-cc-button%" type="button"/>
47 - <br><input class="btn" id="pp" value="%donate_interface-paypal-button%" type="button"><span id="loading"></span>
 46+ <input class="btn" id="cc" value="%donate_interface-ccdc-button%" type="button"/><br/>
 47+ <input class="btn" id="pp" value="%donate_interface-paypal-button%" type="button"/>
4848 </p>
4949 </div>
5050 </form>
5151 </div>
52 -
 52+ <hr/>
5353 <div id="callout-content">
54 - <hr/>
5554 <p id="informationsharing">%donate_interface-informationsharing|url%</p>
 55+ <div id="secure-logo">@verisign_logo</div>
 56+ <ul id="moreinfolinks">
 57+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Monthly_donations&language=@language&uselang=@language&country=@country">%donate_interface-monthly-donation%</a></li>
 58+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&language=@language&uselang=@language&country=@country">%donate_interface-otherways-short%</a></li>
 59+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li>
 60+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Tax_Deductibility&language=@language&uselang=@language&country=@country">%donate_interface-tax-info%</a></li>
 61+ </ul>
5662 </div>
5763 </div>
58 -
 64+ <!-- The appeal -->
5965 <h2 id="appeal-head"><span class="mw-headline">{{LanguageSwitch|2011FR/@appeal-title|@language}}</span></h2>
6066 <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal|@language}}</div>
6167 </div>
6268 </div>
63 -
64 - <hr/>
65 -
66 - <p>
67 - <a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&language=@language&uselang=@language&country=@country">%donate_interface-otherways-short%</a><br/>
68 - <a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a>
69 - </p>
 69+
7070 </div>
7171
7272 <div id="dialog">
7373 <div id="steps">
7474 <form id="donationForm" name="donationForm" action="" method="post">
7575 <fieldset class="step">
76 - <legend>%donate_interface-billing-address%</legend>
 76+ <legend>%donate_interface-cc-form-header-personal%</legend>
7777 <input type="hidden" name="gateway" value="payflowpro" id="gateway" />
7878 <input type="hidden" name="returnto" value="Thank_You/en" />
7979 <input type="hidden" value="@action" name="action" />
@@ -141,11 +141,11 @@
142142 </tr>
143143 </table>
144144 </div>
145 - <a href="#" class="continue-button">Continue</a>
 145+ <a href="#" id="personal-continue" class="continue-button">Continue</a>
146146 </div>
147147 </fieldset>
148148 <fieldset class="step">
149 - <legend>Payment</legend>
 149+ <legend>%donate_interface-cc-form-header-payment%</legend>
150150 <div class="step-content">
151151 <div class="stuff">
152152 <div id="card-errors"></div>
@@ -206,13 +206,15 @@
207207 <label for="email">Security Code</label>
208208 </td>
209209 <td>
210 - <input name="cvv" size="30" value="@cvv" type="text" maxlength="100" class="required" id="cvv" style="width: 50px;" />
 210+ <input name="cvv" size="30" value="@cvv" type="text" maxlength="100" class="required" id="cvv" style="width: 50px;" />&#160;
 211+ <a href="#" onclick="PopupCVV(); return false;" id="cvv-link">What is this?</a>
211212 </td>
212213 </tr>
213214 </table>
214215 </div>
215216 <a href="#" class="back-button" id="goback">Back</a>
216 - <a href="#" class="continue-button" id="submitcreditcard">Continue</a>
 217+ <a href="#" id="cc-continue" class="continue-button">Continue</a>
 218+ <div id="spinner"><img src="@script_path/extensions/DonationInterface/gateway_forms/includes/loading-white.gif"/></div>
217219 </div>
218220 </fieldset>
219221 </form>
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/css/lightbox1.css
@@ -135,6 +135,8 @@
136136 .call-r {
137137 float: right;
138138 margin: 0.2em 0 1em 1em;
 139+ background-color: #CCE7CD;
 140+ border: 1px solid #5EAC58;
139141 }
140142 #loading {
141143 font-size: 12px;
@@ -171,8 +173,9 @@
172174 font-size: 0.8em;
173175 }
174176 input.btn {
175 - font-size: 15px;
 177+ font-size: 14px;
176178 margin-bottom: 4px;
 179+ width: 18em;
177180 }
178181 #dialog{
179182 overflow: hidden;
@@ -283,6 +286,15 @@
284287 right: 25px;
285288 margin: 0 !important;
286289 }
 290+#spinner {
 291+ position: absolute;
 292+ width: 16px;
 293+ height: 16px;
 294+ bottom: 37px;
 295+ right: 133px;
 296+ z-index: 2000;
 297+ display: none;
 298+}
287299 #steps #card-errors {
288300 font-size: 13px;
289301 line-height: 15px;
@@ -295,3 +307,13 @@
296308 font-size: 11px;
297309 line-height: 13px;
298310 }
 311+#secure-logo {
 312+ float: right;
 313+}
 314+#moreinfolinks {
 315+ font-size: 12px;
 316+}
 317+#cvv-link {
 318+ color: #2779AA;
 319+ font-size: 0.8em;
 320+}
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/js/lightbox1.js
@@ -25,27 +25,20 @@
2626 paymentErrorString = temp.join( "<br />" );
2727
2828 // show the errors
29 - var prevError = false;
3029 if ( amountErrorString != "" ) {
31 - $( "#amtErrorMessages" ).html( amountErrorString );
32 - prevError = true;
 30+ $( "#topError" ).html( amountErrorString );
 31+ } else if ( billingErrorString != "" ) {
 32+ $( "#topError" ).html( billingErrorString );
 33+ } else if ( paymentErrorString != "" ) {
 34+ $( "#topError" ).html( paymentErrorString );
3335 }
34 - if ( billingErrorString != "" ) {
35 - $( "#billingErrorMessages" ).html( billingErrorString );
36 - if ( !prevError ) {
37 - prevError = true;
38 - }
39 - }
40 - if ( paymentErrorString != "" ) {
41 - $( "#paymentErrorMessages" ).html( paymentErrorString );
42 - }
4336
4437 $( '#dialog' ).dialog( {
4538 width: 600,
4639 resizable: false,
4740 autoOpen: false,
4841 modal: true,
49 - title: mw.msg( 'donate_interface-cc-button' )
 42+ title: mw.msg( 'donate_interface-ccdc-button' )
5043 } );
5144
5245 // If the form is being reloaded, restore the amount
@@ -65,22 +58,52 @@
6659 }
6760
6861 $( '#cc' ).click( function() {
 62+
 63+ // Make sure cookies are enabled
 64+ document.cookie = 'wmf_test=1;';
 65+ if ( document.cookie.indexOf( 'wmf_test=1' ) != -1 ) {
 66+ document.cookie = 'wmf_test=; expires=Thu, 01-Jan-70 00:00:01 GMT;'; // unset the cookie
 67+ } else {
 68+ alert( mw.msg( 'donate_interface-error-msg-cookies' ) ); // display error
 69+ return false;
 70+ }
 71+
6972 if ( validateAmount() ) {
7073 $( '#dialog' ).dialog( 'open' );
 74+ $( "#spinner" ).hide(); // just in case
7175 }
7276 });
7377 $( '#pp' ).click( function() {
7478 if ( validateAmount() ) {
7579 //$( 'input#pp' ).attr( 'disabled', 'disabled' );
7680 $( "input[name='gateway']" ).val( 'paypal' );
77 - document.paypalcontribution.action = "https://wikimediafoundation.org/wiki/Special:ContributionTracking/en";
 81+ $( 'input[name="PaypalRedirect"]' ).val( "1" );
 82+ document.paypalcontribution.action = actionURL;
7883 document.paypalcontribution.submit();
7984 }
8085 });
8186
82 - /* Set selected amount to amount */
83 - $( "input[name='amountRadio']" ).click( function() { setAmount( $( this ) ); } );
84 - $( "#other-amount" ).change( function() { setAmount( $( this ) ); } );
 87+ // Set amount when a radio button is clicked
 88+ $( 'input[name="amountRadio"]' ).click( function() {
 89+ if ( !isNaN( $( this ).val() ) ) {
 90+ setAmount( $( this ) );
 91+ }
 92+ if ( $( this ).val() == 'other' ) {
 93+ setAmount( $( '#other-amount' ) );
 94+ }
 95+ } );
 96+ // Change the amount when "other" is focused
 97+ $( "#other-amount" ).focus( function() {
 98+ $( '#input_amount_other' ).attr( 'checked', true );
 99+ setAmount( $( '#other-amount' ) );
 100+ } );
 101+ // Reset the amount field when "other" is changed
 102+ $( "#other-amount" ).keyup( function() {
 103+ if ( $( '#input_amount_other' ).is( ':checked' ) ) {
 104+ setAmount( $( this ) );
 105+ }
 106+ } );
 107+
85108 function setAmount(e) { $("input[name='amount']").val( e.val() ); }
86109
87110 /* number of fieldsets */
@@ -94,10 +117,7 @@
95118 Set the final sum as the total width of the steps element.
96119 */
97120 var stepsWidth = 0;
98 - var widths = new Array();
99121 $( '#steps .step' ).each( function(i) {
100 - var $step = $( this );
101 - widths[i] = stepsWidth;
102122 stepsWidth += 600; // Hard-coding as $.width() is not working for some reason
103123 } );
104124 $( '#steps' ).width( stepsWidth );
@@ -107,37 +127,33 @@
108128
109129 /* make continue buttons */
110130 $( 'a.continue-button' ).button();
111 - $( 'a.continue-button' ).click( function(e) {
112 - var $this = $( this );
113 - current = $( this ).parent().parent().index() + 1;
114 - if ( current == fieldsetCount ) {
115 - finalSubmit();
116 - return false;
117 - }
118 - if ( validateStep( current ) === 1 ) {
119 - current = current + 1;
120 - $( '#steps' ).stop().animate( { marginLeft: '-' + widths[current - 1] + 'px' }, 500,
 131+ $( 'a#personal-continue' ).click( function(e) {
 132+ if ( validatePersonal() ) {
 133+ // Advance to the next step
 134+ $( '#steps' ).stop().animate( { marginLeft: '-600px' }, 500,
121135 function() {
122 - $( '#donationForm' ).children( ':nth-child(' + parseInt(current) + ')' ).find( ':input:first' ).focus();
 136+ $( '#donationForm' ).children( ':nth-child(1)' ).find( ':input:first' ).focus();
123137 }
124138 );
125 - } else {
126 - $this.blur();
127139 }
128 -
129 - e.preventDefault();
 140+ $( this ).blur();
 141+ e.preventDefault();
 142+ return false;
130143 });
 144+ $( 'a#cc-continue' ).click( function(e) {
 145+ finalSubmit();
 146+ e.preventDefault();
 147+ return false;
 148+ });
131149
132150 /* Make back button */
133151 $( 'a.back-button' ).button();
134152 $( 'a.back-button' ).click( function(e) {
135 - var $this = $( this );
136153 /* Set current to 1 less than previous step */
137154 current = $( this ).parent().parent().index();
138 -
139 - $( '#steps' ).stop().animate( { marginLeft: '+' + widths[current - 1] + 'px' }, 500 );
140 -
141 - e.preventDefault();
 155+ $( '#steps' ).stop().animate( { marginLeft: '0px' }, 500 );
 156+ $( this ).blur();
 157+ e.preventDefault();
142158 });
143159
144160 /* Hitting tab on the last input of each fieldset makes the form slide to the next step. */
@@ -152,37 +168,42 @@
153169 });
154170 });
155171
156 - /*
157 - Validates errors on all the fieldsets.
158 - Records if the form has errors in $( '#donationForm' ).data().
159 - */
160 - function validateSteps() {
161 - var formErrors = false;
162 - for( var i = 1; i < fieldsetCount; ++i ) {
163 - var error = validateStep(i);
164 - if ( error == -1 ) formErrors = true;
165 - }
166 - $( '#donationForm' ).data( 'errors', formErrors );
167 - }
168 -
169172 function finalSubmit() {
170 -
171 - // Reset the error display
172 - $( '#card-errors' ).empty();
 173+ var step = 2;
 174+ var errors = false;
173175
174 - var formErrors = false;
175 - for( var i = 1; i <= fieldsetCount; ++i ) {
176 - var error = validateStep(i);
177 - if ( error == -1 ) formErrors = true;
 176+ $( '#donationForm' ).children( ':nth-child(' + step + ')' ).find( ':input:not(button).required' ).each( function() {
 177+ var $this = $( this );
 178+ var valueLength = $.trim( $this.val() ).length;
 179+ if ( valueLength == 0 ) {
 180+ errors = true;
 181+ $this.css( 'background-color', '#FFEDEF' );
 182+ } else {
 183+ $this.css( 'background-color', '#FFFFFF' );
 184+ }
 185+ });
 186+
 187+ // Validate credit card number
 188+ cardNumber = $( '#card_num' ).val();
 189+ cardNumber = $.trim( cardNumber );
 190+ if ( cardNumber != '' ) {
 191+ cardNumber = cardNumber.replace(/ /g,''); // remove any spaces
 192+ // Make sure it contains only digits
 193+ var ccCheckRegExp = /[^\d]/;
 194+ if ( ccCheckRegExp.test(cardNumber) ) {
 195+ errors = true;
 196+ $( '#card_num' ).css( 'background-color', '#FFEDEF' );
 197+ } else {
 198+ $( '#card_num' ).css( 'background-color', '#FFFFFF' );
 199+ }
178200 }
179 - $( '#donationForm' ).data( 'errors', formErrors );
180201
181 - if ( $( '#donationForm' ).data( 'errors' ) ) {
182 - alert( 'Please correct the errors in the form.' );
 202+ if ( errors ) {
 203+ //alert( mw.msg( 'donate_interface-error-msg-validation' ) );
183204 return false;
184205 } else {
185206 /* Set country to US */
186 - $( "input[name='country']" ).val('US' );
 207+ $( "input[name='country']" ).val( 'US' );
187208
188209 /* Set expiration date */
189210 $( "input[name='expiration']" ).val(
@@ -190,81 +211,55 @@
191212 )
192213
193214 /* Submit the form */
194 - var sendData = {
195 - 'action': 'donate',
196 - 'gateway': 'payflowpro',
197 - 'currency_code': 'USD',
198 - 'amount': $( "input[name='amount']" ).val(),
199 - 'fname': $( "input[name='fname']" ).val(),
200 - 'lname': $( "input[name='lname']" ).val(),
201 - 'street': $( "input[name='street']" ).val(),
202 - 'city': $( "input[name='city']" ).val(),
203 - 'state': $( 'select#state option:selected' ).val(),
204 - 'zip': $( "input[name='zip']" ).val(),
205 - 'emailAdd': $( "input[name='emailAdd']" ).val(),
206 - 'country': $( "input[name='country']" ).val(),
207 - 'payment_method': 'cc',
208 - 'language': 'en',
209 -
210 - 'expiration': $( "input[name='expiration']" ).val(),
211 - 'card_num': $( "input[name='card_num']" ).val(),
212 - 'cvv': $( "input[name='cvv']" ).val(),
213 - 'card_type': '',
214 -
215 - 'format': 'json'
216 - };
217 -
218 - $.ajax( {
219 - 'url': mw.util.wikiScript( 'api' ),
220 - 'data': sendData,
221 - 'dataType': 'json',
222 - 'type': 'POST',
223 - 'success': function( data ) {
224 - console.debug( data );
225 - if ( data.result.errors ) {
226 - var errors = new Array();
227 - $.each( data.result.errors, function( index, value ) {
228 - $( '#card-errors' ).append( '<div class="error-msg">'+value+'</div>' );
229 - } );
230 - } else {
231 - if ( data.result.returnurl ) {
232 - window.location = data.result.returnurl;
233 - }
234 - }
235 - }
236 - } );
237 - //document.donationForm.action = $( "input[name='action']" ).val();
 215+ document.donationForm.action = $( "input[name='action']" ).val();
 216+ $( "#spinner" ).show();
238217 //document.donationForm.submit();
239218 }
240219 }
241 -
242 - /*
243 - validates one fieldset
244 - returns -1 if errors found, or 1 if not
245 - */
246 - function validateStep( step ) {
247 - var error = 1;
248 - $( '#donationForm' ).children( ':nth-child(' + parseInt(step) + ')' ).find( ':input:not(button).required' ).each( function() {
 220+
 221+ function validatePersonal() {
 222+ var step = 1;
 223+ var errors = false;
 224+
 225+ $( '#donationForm' ).children( ':nth-child(' + step + ')' ).find( ':input:not(button).required' ).each( function() {
249226 var $this = $( this );
250 - var valueLength = jQuery.trim( $this.val() ).length;
251 -
252 - if ( valueLength == '' ) {
253 - error = -1;
 227+ var valueLength = $.trim( $this.val() ).length;
 228+ if ( valueLength == 0 ) {
 229+ errors = true;
254230 $this.css( 'background-color', '#FFEDEF' );
255231 } else {
256232 $this.css( 'background-color', '#FFFFFF' );
257233 }
258234 });
259 -
260 - return error;
 235+
 236+ // Validate email address
 237+ email = $( '#email' ).val();
 238+ email = $.trim( email );
 239+ if( email != '' ) {
 240+ var apos = email.indexOf("@");
 241+ var dotpos = email.lastIndexOf(".");
 242+ if( apos < 1 || dotpos-apos < 2 ) {
 243+ errors = true;
 244+ $( '#email' ).css( 'background-color', '#FFEDEF' );
 245+ } else {
 246+ $( '#email' ).css( 'background-color', '#FFFFFF' );
 247+ }
 248+ }
 249+
 250+ if ( errors ) {
 251+ return false;
 252+ } else {
 253+ return true;
 254+ }
261255 }
262256
263257 /**
264258 * Validate the donation amount to make sure it is formatted correctly and at least a minimum amount.
265259 */
266260 function validateAmount() {
267 - var error = true;
 261+ var errors = false;
268262 var amount = $( "input[name='amount']" ).val(); // get the amount
 263+
269264 // Normalize weird amount formats.
270265 // Don't mess with these unless you know what you're doing.
271266 amount = amount.replace( /[,.](\d)$/, '\:$10' );
@@ -273,8 +268,8 @@
274269 amount = amount.replace( /:/, '.' );
275270 $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form
276271
277 - // Check amount is a real number, sets error as true (good) if no issues
278 - error = ( amount == null || isNaN( amount ) || amount.value <= 0 );
 272+ // Check amount is a real number greater than 0
 273+ errors = ( amount == null || isNaN( amount ) || parseFloat( amount ) <= 0 );
279274
280275 // Find out the currency code
281276 if ( $( 'input[name="currency_code"]' ).val() == '' ) {
@@ -288,12 +283,16 @@
289284 if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) {
290285 wgCurrencyMinimums[currency_code] = 1;
291286 }
292 - if ( amount < wgCurrencyMinimums[currency_code] || error ) {
 287+ if ( amount < wgCurrencyMinimums[currency_code] || errors ) {
 288+ errors = true;
293289 alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) );
294 - error = true;
295290 $( '#other-amount' ).val( '' );
296291 $( '#other-amount' ).focus();
297292 }
298 - return !error;
 293+ if ( errors ) {
 294+ return false;
 295+ } else {
 296+ return true;
 297+ }
299298 };
300299 });
Index: trunk/extensions/DonationInterface/gateway_forms/rapidhtml/RapidHtmlResources.php
@@ -28,9 +28,11 @@
2929 'jquery.ui.resizable',
3030 'jquery.ui.button',
3131 'jquery.ui.dialog',
 32+ 'ext.donationInterface.errorMessages',
3233 ),
3334 'messages' => array(
3435 'donate_interface-cc-button',
 36+ 'donate_interface-ccdc-button',
3537 'donate_interface-paypal-button',
3638 ),
3739 'localBasePath' => dirname( __FILE__ ).'/../../payflowpro_gateway/forms',
Index: trunk/extensions/DonationInterface/gateway_forms/Form.php
@@ -959,9 +959,9 @@
960960 */
961961 protected function getSmallSecureLogo() {
962962
963 - $form = '<table id="secureLogo" width="135" border="0" cellpadding="2" cellspacing="0" title=' . wfMsg('donate_interface-securelogo-title') . '>';
 963+ $form = '<table id="secureLogo" width="130" border="0" cellpadding="2" cellspacing="0" title=' . wfMsg('donate_interface-securelogo-title') . '>';
964964 $form .= '<tr>';
965 - $form .= '<td width="135" align="center" valign="top"><script type="text/javascript" src="https://seal.verisign.com/getseal?host_name=payments.wikimedia.org&size=S&use_flash=NO&use_transparent=NO&lang=en"></script><br /><a href="http://www.verisign.com/ssl-certificate/" target="_blank" style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">' . wfMsg('donate_interface-secureLogo-text') . '</a></td>';
 965+ $form .= '<td width="130" align="center" valign="top"><script type="text/javascript" src="https://seal.verisign.com/getseal?host_name=payments.wikimedia.org&size=S&use_flash=NO&use_transparent=NO&lang=en"></script><br /><a href="http://www.verisign.com/ssl-certificate/" target="_blank" style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">' . wfMsg('donate_interface-secureLogo-text') . '</a></td>';
966966 $form .= '</tr>';
967967 $form .= '</table>';
968968 return $form;
Index: trunk/extensions/DonationInterface/gateway_common/interface.i18n.php
@@ -166,6 +166,7 @@
167167 'donate_interface-error-msg-nopaypal' => 'Due to a technical error, we cannot send your request to PayPal. Please try using our regular credit card donation form.',
168168 'donate_interface-error-msg' => 'Please enter your $1',
169169 'donate_interface-error-msg-js' => 'Please enter your',
 170+ 'donate_interface-error-msg-validation' => 'Please correct the errors in the form.',
170171 'donate_interface-error-msg-invalid-amount' => 'Please enter a valid amount',
171172 'donate_interface-error-msg-email' => 'Please enter a valid e-mail address',
172173 'donate_interface-error-msg-card-num' => 'Please enter a valid credit card number for one of the accepted credit card types',
@@ -603,6 +604,7 @@
604605 An alternative to 'field' in the translation could be 'information'.
605606
606607 This is an error message which appears if one or more of the above fields is left empty.",
 608+ 'donate_interface-error-msg-validation' => 'Generic error message for form validation failure',
607609 'donate_interface-error-msg-invalid-amount' => 'Error message for invalid amount (e.g. if you put a letter in the amount field).',
608610 'donate_interface-error-msg-email' => 'Error message if the e-mail address is not valid (e.g. non-ASCII characters, spaces or lacking @).',
609611 'donate_interface-error-msg-card-num' => 'The stars are to attract attention to the message in a drop-down box. The stars are not interpreted as wiki code when in use in the extension.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r103541follow-up to r103537, forgot to enable form submissionkaldari00:42, 18 November 2011
r103624MFT r103434, r103537, r103541, r103548khorn23:04, 18 November 2011
r106245MFT r102664, r102689, r102736, r102807, r102812, r102824, r102872, r102922, r...awjrichards21:26, 14 December 2011

Status & tagging log