From f9b700e75c682df3c48efb0e69f893c61f06d3bd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 3 Nov 2009 13:40:59 -0800 Subject: Delay initializing the recaptcha to allow the recaptcha JS to load and initialize. Fixes ticket #851. --- modules/recaptcha/views/form_recaptcha.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/views/form_recaptcha.html.php b/modules/recaptcha/views/form_recaptcha.html.php index f26ebdf6..20e7359e 100644 --- a/modules/recaptcha/views/form_recaptcha.html.php +++ b/modules/recaptcha/views/form_recaptcha.html.php @@ -12,6 +12,6 @@ callback: Recaptcha.focus_response_field } ); - }, 0); + }, 500); -- cgit v1.2.3 From 9a33f96e31ba41d78ab24eb9420d74578c7fbbcf Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 3 Nov 2009 14:44:53 -0800 Subject: Add a register_add_form event handler to recaptcha to add the recaptcha to the bottom of the user registration form in the register module. --- modules/recaptcha/helpers/recaptcha_event.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php index feedced4..e7ded3ab 100644 --- a/modules/recaptcha/helpers/recaptcha_event.php +++ b/modules/recaptcha/helpers/recaptcha_event.php @@ -24,6 +24,12 @@ class recaptcha_event_Core { } } + static function register_add_form($form) { + if (module::get_var("recaptcha", "public_key")) { + $form->register_user->recaptcha("recaptcha")->label("")->id("g-recaptcha"); + } + } + static function admin_menu($menu, $theme) { $menu->get("settings_menu") ->append(Menu::factory("link") -- cgit v1.2.3