{% load i18n %}
<script type="text/javascript">
    var DjangoRecaptchaOptions = {{options}};
    if (typeof RecaptchaOptions !== 'object') {
        RecaptchaOptions = DjangoRecaptchaOptions;
    } else {
        for (key in DjangoRecaptchaOptions) {
            RecaptchaOptions[key] = DjangoRecaptchaOptions[key];
        }
    }
</script>

<div id="recaptcha_widget" style="display:none" class="recaptcha_widget">
    <div id="recaptcha_image"></div>
    <div class="recaptcha_only_if_incorrect_sol" style="color:red">{% trans "Incorrect. Please try again." %}</div>

    <div class="recaptcha_input">
        <label class="recaptcha_only_if_image" for="recaptcha_response_field">{% trans "Enter the words above:" %}</label>
        <label class="recaptcha_only_if_audio" for="recaptcha_response_field">{% trans "Enter the numbers you hear:" %}</label>

        <input type="text" id="recaptcha_response_field" name="recaptcha_response_field">
    </div>

    <ul class="recaptcha_options">
        <li>
            <a href="javascript:Recaptcha.reload()">
                <i class="icon-refresh"></i>
                <span class="captcha_hide">{% trans "Get another CAPTCHA" %}</span>
            </a>
        </li>
        <li class="recaptcha_only_if_image">
            <a href="javascript:Recaptcha.switch_type('audio')">
                <i class="icon-volume-up"></i><span class="captcha_hide"> {% trans "Get an audio CAPTCHA" %}</span>
            </a>
        </li>
        <li class="recaptcha_only_if_audio">
            <a href="javascript:Recaptcha.switch_type('image')">
                <i class="icon-picture"></i><span class="captcha_hide"> {% trans "Get an image CAPTCHA" %}</span>
            </a>
        </li>
        <li>
            <a href="javascript:Recaptcha.showhelp()">
                <i class="icon-question-sign"></i><span class="captcha_hide"> {% trans "Help" %}</span>
            </a>
        </li>
    </ul>
</div>

<script type="text/javascript" src="{{api_server}}/challenge?k={{public_key}}&amp;hl={{lang}}{{error_param}}"></script>
<noscript>
  <iframe src="{{api_server}}/noscript?k={{public_key}}&amp;hl={{lang}}{{error_param}}" height="300" width="500" frameborder="0"></iframe><br>
  <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
  <input type='hidden' name='recaptcha_response_field' value='manual_challenge'>
</noscript>
