summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hosted/kolab_client_task_signup.php8
-rw-r--r--public_html/skins/default/templates/signup.html1
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/hosted/kolab_client_task_signup.php b/lib/hosted/kolab_client_task_signup.php
index bcb5154..8fe1bfc 100644
--- a/lib/hosted/kolab_client_task_signup.php
+++ b/lib/hosted/kolab_client_task_signup.php
@@ -77,7 +77,13 @@ class kolab_client_task_signup extends kolab_client_task
// add captcha
$publickey = $this->config->get('kolab_wap', 'recaptcha_public_key');
// TODO find a less dirty way to add captcha into form
- $form = preg_replace('/<div class="formbuttons">/', '<div class="formbuttons">'.recaptcha_get_html($publickey), $form);
+ $form = preg_replace('/<div class="formbuttons">/', '<div id="recaptcha_div"></div><div class="formbuttons">', $form);
+
+ // load captcha
+ $form .= '
+ <script type="text/javascript">
+ Recaptcha.create("'.$publickey.'", "recaptcha_div", {theme: "red"});
+ </script>';
$this->output->assign('form', $form);
$this->output->set_object('taskcontent', $form);
diff --git a/public_html/skins/default/templates/signup.html b/public_html/skins/default/templates/signup.html
index d68e61a..9eb22bc 100644
--- a/public_html/skins/default/templates/signup.html
+++ b/public_html/skins/default/templates/signup.html
@@ -7,6 +7,7 @@
<link rel="shortcut icon" type="image/png" href="{$skin_path}images/favicon.png" />
<script src="js/jquery.min.js"></script>
<script src="js/kolab_admin.js"></script>
+ <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<script src="js/kolab_hosted.js"></script>
<script src="{$skin_path}ui.js"></script>
</head>