CaptchaBundle/Resources/views/captcha.html.twig
2015-05-22 15:01:00 +02:00

20 lines
706 B
Twig

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