aboutsummaryrefslogtreecommitdiff
path: root/mod/captcha/views/default
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
commite10b0bd1f9403d38568173d76a93f93a484d9646 (patch)
tree9f0e5fb09d4a6281810a1d54928f6308bdce0672 /mod/captcha/views/default
parent75d2225cd98feafd5e5e75df5505914295f569ff (diff)
parentcb346ff43a63f93ff5275502638c51a4653fac7d (diff)
downloadelgg-e10b0bd1f9403d38568173d76a93f93a484d9646.tar.gz
elgg-e10b0bd1f9403d38568173d76a93f93a484d9646.tar.bz2
Merge commit 'cb346ff43a63f93ff5275502638c51a4653fac7d' as 'mod/captcha'
Diffstat (limited to 'mod/captcha/views/default')
-rw-r--r--mod/captcha/views/default/captcha/css.php4
-rw-r--r--mod/captcha/views/default/input/captcha.php19
2 files changed, 23 insertions, 0 deletions
diff --git a/mod/captcha/views/default/captcha/css.php b/mod/captcha/views/default/captcha/css.php
new file mode 100644
index 000000000..d06a26d7d
--- /dev/null
+++ b/mod/captcha/views/default/captcha/css.php
@@ -0,0 +1,4 @@
+.captcha-input-image {
+ text-align: center;
+ margin: auto;
+}
diff --git a/mod/captcha/views/default/input/captcha.php b/mod/captcha/views/default/input/captcha.php
new file mode 100644
index 000000000..cc78ffb08
--- /dev/null
+++ b/mod/captcha/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>