summaryrefslogtreecommitdiff
path: root/modules/recaptcha/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-01-25 16:35:25 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-01-25 16:35:25 +0000
commit4bb2c53c8ff99a879aaffb90338a92d56cf65e28 (patch)
treee2dac1bee54b8ede2a8696503fd1114fe30e5b35 /modules/recaptcha/views
parent1633001d7fddbb5fd5baa0a774041e001d8e7723 (diff)
Added the ability to identify and present the defined forms to the
adminstrator. The forms are presented as a checklist, I would have preferred a selection list, but Forge doesn't have one. The generated html to contain the recaptcha challenge is defined as <ul> as that was the only way to force itto line up.
Diffstat (limited to 'modules/recaptcha/views')
-rw-r--r--modules/recaptcha/views/admin_recaptcha.html.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php
index ebba31d5..64266d20 100644
--- a/modules/recaptcha/views/admin_recaptcha.html.php
+++ b/modules/recaptcha/views/admin_recaptcha.html.php
@@ -2,10 +2,10 @@
<script type="text/javascript" src="http://api.recaptcha.net/js/recaptcha_ajax.js"></script>
<script>
var site = (document.location.protocol == "http:") ? "<?= $form->recaptcha_site ?>" : "<?= $form->recaptcha_ssl_site ?>";
-var RecaptchaOptions = {lang: 'en'};
+var RecaptchaOptions = {lang: 'en', theme: "white"};
-$("#gAdminRecaptcha form").ready(function() {
- $("#gAdminRecaptcha form ul li:last-child").before("<li id=recaptcha_div />");
+$("#gConfigureRecaptchaForm").ready(function() {
+ $("#gConfigureRecaptchaForm :submit").before("<ul><li id=recaptcha_div /></ul>");
$("#public_key").change(function() {
showRecaptcha($(this).val());
});
@@ -22,15 +22,15 @@ function showRecaptcha(public_key) {
dataType: "json",
cache: false,
error: function(request, textStatus, errorThrown) {
- var public_key = $("#gAdminRecaptcha form ul li:first-child");
+ var public_key = $("#gConfigureRecaptchaForm ul li:first-child");
public_key.addClass("gError");
- $("#gAdminRecaptcha form ul li:first-child p").replaceWith("");
+ $("#gConfigureRecaptchaForm ul li:first-child p").replaceWith("");
public_key.append('<p class="gError">' + request.responseText + "</p>");
},
success: function(data, textStatus) {
- var public_key = $("#gAdminRecaptcha form ul li:first-child");
+ var public_key = $("#gConfigureRecaptchaForm ul li:first-child");
public_key.removeClass("gError");
- $("#gAdminRecaptcha form ul li:first-child p").replaceWith("");
+ $("#gConfigureRecaptchaForm ul li:first-child p").replaceWith("");
$("#recaptcha_div").html("<script type='text/javascript'>" + data.script + "</script" + ">");
}
});