diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-03 14:44:53 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-11-03 14:44:53 -0800 |
commit | 9a33f96e31ba41d78ab24eb9420d74578c7fbbcf (patch) | |
tree | 87241ed1ef40e55d76ff819a6549bf80bbf8f168 /modules/recaptcha/helpers | |
parent | 9768131d149fa47fe545f33cca968c97aa9c9c32 (diff) |
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.
Diffstat (limited to 'modules/recaptcha/helpers')
-rw-r--r-- | modules/recaptcha/helpers/recaptcha_event.php | 6 |
1 files changed, 6 insertions, 0 deletions
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") |