CaptchaBundle/Resources/views/captcha.html.twig

21 lines
659 B
Twig
Raw Normal View History

{% block captcha_widget %}
2012-12-04 12:20:23 +01:00
{% if is_human %}
-
{% else %}
{% spaceless %}
<img id="{{ id }}" src="{{ captcha_code }}" alt="" title="captcha" width="{{ captcha_width }}" height="{{ captcha_height }}" />
{% if reload %}
<script type="text/javascript">
function reload_{{ id }}() {
var img = document.getElementById('{{ id }}');
img.src = '{{ captcha_code }}?n=' + (new Date()).getTime();
}
</script>
<a class="captcha_reload" href="javascript:reload_{{ id }}();">{{ 'Renew'|trans({}, 'gregwar_captcha') }}</a>
{% endif %}
{{ form_widget(form) }}
{% endspaceless %}
2012-12-04 12:20:23 +01:00
{% endif %}
{% endblock %}