summaryrefslogtreecommitdiff
path: root/modules/recaptcha/views
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/recaptcha/views
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/recaptcha/views')
-rw-r--r--modules/recaptcha/views/admin_recaptcha.html.php46
-rw-r--r--modules/recaptcha/views/form_recaptcha.html.php6
2 files changed, 27 insertions, 25 deletions
diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php
index 0a4b1f8f..4f07fef0 100644
--- a/modules/recaptcha/views/admin_recaptcha.html.php
+++ b/modules/recaptcha/views/admin_recaptcha.html.php
@@ -1,33 +1,35 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gAdminRecaptcha">
- <h1> <?= t("reCAPTCHA Challenge Filtering") ?> </h1>
+<div class="g-block">
+ <h1> <?= t("reCAPTCHA challenge filtering") ?> </h1>
<p>
<?= t("reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows. In order to use it, you need to sign up for a <a href=\"%domain_url\">reCAPTCHA Public/Private Key pair</a>, which is also free. Once registered, the challenge and response strings are evaluated at <a href=\"%recaptcha_url\">recaptcha.net</a> to determine if the form content has been entered by a bot.",
array("domain_url" => $form->get_key_url,
"recaptcha_url" => html::mark_clean("http://recaptcha.net"))) ?>
</p>
- <?= $form ?>
-</div>
+ <div class="g-block-content">
+ <?= $form ?>
-<? if ($public_key && $private_key): ?>
-<div id="gAdminRecaptchaTest" class="gBlock">
- <h2> <?= t("reCAPTCHA Test") ?> </h2>
- <p>
- <?= t("If you see a CAPTCHA form below, then reCAPTCHA is functioning properly.") ?>
- </p>
+ <? if ($public_key && $private_key): ?>
+ <div id="g-admin-recaptcha-test">
+ <h2> <?= t("reCAPTCHA test") ?> </h2>
+ <p>
+ <?= t("If you see a CAPTCHA form below, then reCAPTCHA is functioning properly.") ?>
+ </p>
+
+ <div id="g-recaptcha">
+ <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script>
+ <script type="text/javascript">
+ Recaptcha.create("<?= $public_key ?>", "g-recaptcha", {
+ callback: Recaptcha.focus_response_field,
+ lang: "en",
+ custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>},
+ theme: "white"
+ });
+ </script>
+ </div>
+ </div>
+ <? endif ?>
- <div id="gRecaptcha"/>
- <script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script>
- <script type="text/javascript">
- Recaptcha.create("<?= $public_key ?>", "gRecaptcha", {
- callback: Recaptcha.focus_response_field,
- lang: "en",
- custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>},
- theme: "white"
- });
- </script>
</div>
</div>
-<? endif ?>
-
diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php
index 4ec04c49..20e7359e 100644
--- a/modules/recaptcha/views/form_recaptcha.html.php
+++ b/modules/recaptcha/views/form_recaptcha.html.php
@@ -1,17 +1,17 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gRecaptcha"></div>
+<div id="g-recaptcha"></div>
<script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script>
<script type="text/javascript">
setTimeout(function() {
Recaptcha.create(
"<?= $public_key ?>",
- "gRecaptcha",
+ "g-recaptcha",
{
theme: "white",
custom_translations : { instructions_visual : <?= t("Type words to check:")->for_js() ?>},
callback: Recaptcha.focus_response_field
}
);
- }, 0);
+ }, 500);
</script>