[vhffs-dev] [2072] gradator: same applies for reCAPTCHA, you don't like it, don' t break it |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 2072
Author: beuss
Date: 2012-02-26 18:34:12 +0100 (Sun, 26 Feb 2012)
Log Message:
-----------
gradator: same applies for reCAPTCHA, you don't like it, don't break it
Fixed XHTML compliance for captcha (using ajax api since it seems that's
the way to do it?\226?\128?\166).
Modified Paths:
--------------
trunk/vhffs-panel/templates/anonymous/subscribe.tt
Modified: trunk/vhffs-panel/templates/anonymous/subscribe.tt
===================================================================
--- trunk/vhffs-panel/templates/anonymous/subscribe.tt 2012-02-26 17:22:39 UTC (rev 2071)
+++ trunk/vhffs-panel/templates/anonymous/subscribe.tt 2012-02-26 17:34:12 UTC (rev 2072)
@@ -53,12 +53,22 @@
lang: '[% language.substr(0, 2) | html %]'
};
</script>
- <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=[% captcha_pubkey | html %]"></script>
+ <div id="recaptcha-field" style="float:left;"></div>
<noscript>
- <iframe src="http://www.google.com/recaptcha/api/noscript?k=[% captcha_pubkey | html %]" height="300" width="500" frameborder="0"></iframe><br/>
+ <div id="no_js_recaptcha">
+ <object type="text/html" data="http://www.google.com/recaptcha/api/noscript?k=[% captcha_pubkey | html %]" height="300" width="500"></object><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
+ <!--[if IE]><iframe src="http://www.google.com/recaptcha/api/noscript?k=[% captcha_pubkey | html %]" height="300" width="500" frameborder="0"></iframe>< ![endif]-->
+ </div>
</noscript>
+ <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
+ <script type="text/javascript">
+ Recaptcha.create("[% captcha_pubkey | html %]", "recaptcha-field", {
+ theme: "white",
+ lang: '[% language.substr(0, 2) | html %]'
+ });
+ </script>
[% END %]
<p class="button" style="clear:both">
<input type="submit" value="[% 'Subscribe' | i18n | html %]" name="create_submit"/>