aboutsummaryrefslogtreecommitdiff
path: root/mod/captcha/views/default/input/captcha.php
blob: cc78ffb083462dc1a235b7fab0312746612df5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>