Added proper support for font size and color
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / captchaQuestion.tpl
1 <input type="hidden" name="captchaQuestion" value="{$captchaQuestion}" />
2
3 {if !$captchaQuestionAnswered}
4 <section class="section">
5 <header class="sectionHeader">
6 <h2 class="sectionTitle">{lang}wcf.captcha.question.captcha{/lang}</h2>
7 <small class="sectionDescription">{lang}wcf.captcha.question.captcha.description{/lang}</small>
8 </header>
9
10 <dl class="condensed{if (($errorType|isset && $errorType|is_array && $errorType[captchaAnswer]|isset) || ($errorField|isset && $errorField == 'captchaAnswer'))} formError{/if}">
11 <dt><label for="captchaAnswer">{lang}{$captchaQuestionObject->question}{/lang}</label></dt>
12 <dd>
13 <input type="text" id="captchaAnswer" name="captchaAnswer" class="medium" />
14 {if (($errorType|isset && $errorType|is_array && $errorType[captchaAnswer]|isset) || ($errorField|isset && $errorField == 'captchaAnswer'))}
15 {if $errorType|is_array && $errorType[captchaAnswer]|isset}
16 {assign var='__errorType' value=$errorType[captchaAnswer]}
17 {else}
18 {assign var='__errorType' value=$errorType}
19 {/if}
20
21 {if $__errorType == 'empty'}
22 <small class="innerError">{lang}wcf.global.form.error.empty{/lang}</small>
23 {else}
24 <small class="innerError">{lang}wcf.captcha.question.answer.error.{$__errorType}{/lang}</small>
25 {/if}
26 {/if}
27 </dd>
28 </dl>
29 </section>
30
31 {if !$ajaxCaptcha|empty}
32 <script data-relocate="true">
33 //<![CDATA[
34 $(function() {
35 WCF.System.Captcha.addCallback('{$captchaID}', function() {
36 return {
37 captchaAnswer: $('#captchaAnswer').val(),
38 captchaQuestion: '{$captchaQuestion}'
39 };
40 });
41 });
42 //]]>
43 </script>
44 {/if}
45 {/if}