Skip to content

Commit

Permalink
Cleanup typo and change what is passwed into the event. pass the grou…
Browse files Browse the repository at this point in the history
…p that the recaptch element should be attached to instead of the whole form. This allows the recaptch event to have no knowledge of the containing form.
  • Loading branch information
Tim Almdal committed Oct 29, 2009
1 parent bfafef9 commit e45ea93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/comment/helpers/comment.php
Expand Up @@ -72,7 +72,7 @@ static function get_add_form($item) {
$group->input("url") ->label(t("Website (hidden)"))->id("g-url");
$group->textarea("text")->label(t("Comment")) ->id("g-text");
$group->hidden("item_id")->value($item->id);
module::event("recaptcha_add", $form);
module::event("recaptcha_add", $group);
$group->submit("")->value(t("Add"))->class("ui-state-default ui-corner-all");

$active = identity::active_user();
Expand Down
2 changes: 1 addition & 1 deletion modules/recaptcha/helpers/recaptcha_event.php
Expand Up @@ -20,7 +20,7 @@
class recaptcha_event_Core {
static function recaptcha_add($form) {
if (module::get_var("recaptcha", "public_key")) {
$form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha");
$form->recaptcha("recaptcha")->label("")->id("g-recaptcha");
}
}

Expand Down

0 comments on commit e45ea93

Please sign in to comment.