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/helpers') 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