{#
/**
* @file
* Default theme implementation for a captcha.
*
* Available variables:
* - is_visible: Boolean to indicate if the CAPTCHA is visible or was
* already solved (but element still needed for hidden inputs).
* - attributes: HTML attributes for the containing element.
* - title: The captcha title
* - description: The captcha description
* - element: The captcha element itself (image, recaptcha, ...)
*
* @see template_preprocess_captcha()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'captcha',
('captcha-type-challenge--' ~ element['#captcha_type_challenge'])|clean_class,
]
%}
{% block captcha %}
{% if is_visible %}
{% block captcha_display %}
{% if title is not empty %}
{% else %}
{% endif %}
{% endblock %}
{% else %}
{# Required for _captcha_required_for_user() to preserve the hidden fields
in the form even though the CAPTCHA is not visible. #}
{{ element }}
{% endif %}
{% endblock %}