aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/captcha.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:53:35 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:53:35 -0300
commitcb346ff43a63f93ff5275502638c51a4653fac7d (patch)
tree377272fd09d298870124b2537ce200a62b3e75b3 /views/default/input/captcha.php
downloadelgg-cb346ff43a63f93ff5275502638c51a4653fac7d.tar.gz
elgg-cb346ff43a63f93ff5275502638c51a4653fac7d.tar.bz2
Squashed 'mod/captcha/' content from commit c7ac34e
git-subtree-dir: mod/captcha git-subtree-split: c7ac34e65fed6e9fc08f85dc4734b29c4fd51147
Diffstat (limited to 'views/default/input/captcha.php')
-rw-r--r--views/default/input/captcha.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/views/default/input/captcha.php b/views/default/input/captcha.php
new file mode 100644
index 000000000..cc78ffb08
--- /dev/null
+++ b/views/default/input/captcha.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg captcha plugin captcha hook view override.
+ *
+ * @package ElggCaptcha
+ */
+
+// Generate a token which is then passed into the captcha algorithm for verification
+$token = captcha_generate_token();
+?>
+<div>
+ <label><?php echo elgg_echo('captcha:entercaptcha'); ?></label>
+ <br />
+ <?php
+ echo elgg_view('input/hidden', array('name' => "captcha_token", 'value' => $token));
+ echo elgg_view('output/img', array('src'=> elgg_get_site_url() . "captcha/$token", 'class' => 'captcha-input-image'));
+ echo elgg_view('input/text', array('name' => 'captcha_input', 'class' => 'captcha-input-text'));
+ ?>
+</div>