summaryrefslogtreecommitdiff
path: root/modules/recaptcha/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/recaptcha/helpers')
-rw-r--r--modules/recaptcha/helpers/recaptcha.php2
-rw-r--r--modules/recaptcha/helpers/recaptcha_event.php8
-rw-r--r--modules/recaptcha/helpers/recaptcha_theme.php28
3 files changed, 36 insertions, 2 deletions
diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php
index bead6156..789bae85 100644
--- a/modules/recaptcha/helpers/recaptcha.php
+++ b/modules/recaptcha/helpers/recaptcha.php
@@ -19,7 +19,7 @@
*/
class recaptcha_Core {
static function get_configure_form() {
- $form = new Forge("admin/recaptcha", "", "post", array("id" => "gConfigureRecaptchaForm"));
+ $form = new Forge("admin/recaptcha", "", "post", array("id" => "g-configure-recaptcha-form"));
$group = $form->group("configure_recaptcha")
->label(t("Configure reCAPTCHA"));
$group->input("public_key")
diff --git a/modules/recaptcha/helpers/recaptcha_event.php b/modules/recaptcha/helpers/recaptcha_event.php
index d23a0c74..e7ded3ab 100644
--- a/modules/recaptcha/helpers/recaptcha_event.php
+++ b/modules/recaptcha/helpers/recaptcha_event.php
@@ -20,7 +20,13 @@
class recaptcha_event_Core {
static function comment_add_form($form) {
if (module::get_var("recaptcha", "public_key")) {
- $form->add_comment->recaptcha("recaptcha")->label("")->id("gRecaptcha");
+ $form->add_comment->recaptcha("recaptcha")->label("")->id("g-recaptcha");
+ }
+ }
+
+ static function register_add_form($form) {
+ if (module::get_var("recaptcha", "public_key")) {
+ $form->register_user->recaptcha("recaptcha")->label("")->id("g-recaptcha");
}
}
diff --git a/modules/recaptcha/helpers/recaptcha_theme.php b/modules/recaptcha/helpers/recaptcha_theme.php
new file mode 100644
index 00000000..fd1f563c
--- /dev/null
+++ b/modules/recaptcha/helpers/recaptcha_theme.php
@@ -0,0 +1,28 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class recaptcha_theme_Core {
+ static function head($theme) {
+ $theme->css("recaptcha.css");
+ }
+
+ static function admin_head($theme) {
+ $theme->css("recaptcha.css");
+ }
+} \ No newline at end of file