Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
30 | public function make() |
||
31 | { |
||
32 | // if captcha is 'full-type' based just return rendered output |
||
33 | if (App::$Captcha->isFull()) { |
||
34 | return App::$Captcha->get(); |
||
35 | } |
||
36 | // get image link |
||
37 | $image = App::$Captcha->get(); |
||
38 | // build image tag |
||
39 | $response = self::buildSingleTag('img', [ |
||
40 | 'id' => 'src-secure-image', |
||
41 | 'src' => $image, |
||
42 | 'alt' => 'secure captcha image', |
||
43 | 'onClick' => 'this.src=\'' . $image . '&rnd=\'+Math.random()' |
||
44 | ]); |
||
45 | // render response tag with image |
||
46 | $this->properties['type'] = 'text'; |
||
47 | $response .= self::buildSingleTag('input', $this->properties); |
||
48 | return $response; |
||
49 | } |
||
50 | } |