Skip to content

Commit

Permalink
Generalize the adding of the recaptcha form by changing the name of t…
Browse files Browse the repository at this point in the history
…he event to recaptch_add. This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha.
  • Loading branch information
Tim Almdal committed Oct 29, 2009
1 parent 53dd35b commit bfafef9
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("comment_add_form", $form);
module::event("recaptcha_add", $form);
$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 @@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class recaptcha_event_Core {
static function comment_add_form($form) {
static function recaptcha_add($form) {
if (module::get_var("recaptcha", "public_key")) {
$form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha");
}
Expand Down

0 comments on commit bfafef9

Please sign in to comment.