Index: trunk/extensions/DonationInterface/donationinterface.php |
— | — | @@ -610,6 +610,7 @@ |
611 | 611 | 'donate_interface-error-msg-cvv', |
612 | 612 | 'donate_interface-error-msg-captcha', |
613 | 613 | 'donate_interface-error-msg-captcha-please', |
| 614 | + 'donate_interface-error-msg-cookies', |
614 | 615 | 'donate_interface-donor-fname', |
615 | 616 | 'donate_interface-donor-lname', |
616 | 617 | 'donate_interface-donor-street', |
Index: trunk/extensions/DonationInterface/modules/validate_input.js |
— | — | @@ -86,8 +86,16 @@ |
87 | 87 | var dotpos = form.emailAdd.value.lastIndexOf("."); |
88 | 88 | |
89 | 89 | if( apos < 1 || dotpos-apos < 2 ) { |
90 | | - output += mw.msg( 'donate_interface-error-msg-email' ); |
| 90 | + output += mw.msg( 'donate_interface-error-msg-email' ) + '.\r\n'; |
91 | 91 | } |
| 92 | + |
| 93 | + // Make sure cookies are enabled |
| 94 | + document.cookie = 'wmf_test=1;'; |
| 95 | + if ( document.cookie.indexOf( 'wmf_test=1' ) != -1 ) { |
| 96 | + document.cookie = 'wmf_test=; expires=Thu, 01-Jan-70 00:00:01 GMT;'; // unset the cookie |
| 97 | + } else { |
| 98 | + output += mw.msg( 'donate_interface-error-msg-cookies' ); // display error |
| 99 | + } |
92 | 100 | |
93 | 101 | if( output ) { |
94 | 102 | alert( output ); |
— | — | @@ -142,8 +150,16 @@ |
143 | 151 | var dotpos = form.emailAdd.value.lastIndexOf("."); |
144 | 152 | |
145 | 153 | if( apos < 1 || dotpos-apos < 2 ) { |
146 | | - output += mw.msg( 'donate_interface-error-msg-email' ); |
| 154 | + output += mw.msg( 'donate_interface-error-msg-email' ) + '.\r\n'; |
147 | 155 | } |
| 156 | + |
| 157 | + // Make sure cookies are enabled |
| 158 | + document.cookie = 'wmf_test=1;'; |
| 159 | + if ( document.cookie.indexOf( 'wmf_test=1' ) != -1 ) { |
| 160 | + document.cookie = 'wmf_test=; expires=Thu, 01-Jan-70 00:00:01 GMT;'; // unset the cookie |
| 161 | + } else { |
| 162 | + output += mw.msg( 'donate_interface-error-msg-cookies' ); // display error |
| 163 | + } |
148 | 164 | |
149 | 165 | if( output ) { |
150 | 166 | alert( output ); |
Index: trunk/extensions/DonationInterface/gateway_common/interface.i18n.php |
— | — | @@ -187,6 +187,7 @@ |
188 | 188 | 'donate_interface-error-msg-cvv' => 'CVV from the back of your card', |
189 | 189 | 'donate_interface-error-msg-captcha' => "The Captcha value you entered is incorrect. Please try again.", |
190 | 190 | 'donate_interface-error-msg-captcha-please' => "For your credit card security, please type the characters you see above.", |
| 191 | + 'donate_interface-error-msg-cookies' => 'Please enable cookies in your browser.', |
191 | 192 | 'php-response-declined' => 'Your transaction could not be accepted.', |
192 | 193 | 'donate_interface-thankyou' => 'Thank you for your donation!', |
193 | 194 | 'donate_interface-post-transaction' => 'Transaction details', |
— | — | @@ -619,6 +620,7 @@ |
620 | 621 | 'donate_interface-error-msg-cvv' => 'Used in error message regarding the card security code field.', |
621 | 622 | 'donate_interface-error-msg-captcha' => 'Error message if the user inputs the wrong [[w:en:CAPTCHA|CAPTCHA]].', |
622 | 623 | 'donate_interface-error-msg-captcha-please' => 'Message given the user if he/she has to fill out a [[w:en:CAPTCHA|CAPTCHA]] before the donation is fulfilled.', |
| 624 | + 'donate_interface-error-msg-cookies' => "Error message if the user's browser has cookies disabled", |
623 | 625 | 'php-response-declined' => 'Error message if the translaction was declined.', |
624 | 626 | 'donate_interface-thankyou' => 'A thank you for donating.', |
625 | 627 | 'donate_interface-post-transaction' => 'Header for transaction details after the transaction is fulfilled (receipt).', |