Changeset 1857
- Timestamp:
- 11/01/2010 03:38:48 AM (19 months ago)
- File:
-
- 1 edited
-
trunk/w/extensions/recaptcha/ReCaptcha.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/w/extensions/recaptcha/ReCaptcha.php
r1820 r1857 67 67 global $recaptcha_public_key,$wgRequest; 68 68 if($wgRequest->getVal('useAjaxSignup')=='1'){ 69 return " 70 <script>jQuery.getScript('http://www.google.com/recaptcha/api/js/recaptcha_ajax.js',function (){Recaptcha.create('".$recaptcha_public_key."','captchadiv',{theme:'custom'});});</script>"; 69 $script = "<script>"; 70 $script .= "jQuery.getScript('http://www.google.com/recaptcha/api/js/recaptcha_ajax.js',"; 71 $script .= "function (){"; 72 $script .= "jQuery('#recaptcha_response_field').click(function(){"; 73 $script .= "jQuery('#recaptcha_image').css({'height':'57px','width':'300px'});"; 74 $script .= "var pos = jQuery('#recaptcha_response_field').position();"; 75 $script .= "jQuery('#recaptcha_image').css({'top':pos.top-57,'left':pos.left});"; 76 $script .= "jQuery('#recaptcha_image').show();onTextboxFocus(this,'Show me the captcha');Recaptcha.create('".$recaptcha_public_key."','captchadiv',{theme:'custom'});});"; 77 $script .= "jQuery('#recaptcha_response_field').blur(function(){"; 78 $script .= "jQuery('#recaptcha_image').hide();onTextboxBlur(this,'Show me the captcha');jQuery('#recaptcha_image').html('');"; 79 $script .= "});"; 80 $script .= "});</script>"; 81 return $script; 71 82 }else{ 72 83 return "<script>var RecaptchaOptions = { tabindex : 1 }; </script> " .
Note: See TracChangeset
for help on using the changeset viewer.
