-
Notifications
You must be signed in to change notification settings - Fork 1
/
captcha_image.htm
32 lines (28 loc) · 996 Bytes
/
captcha_image.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% set field = {
label: 'Captcha',
is_required: true,
name: 'captcha',
id: __SELF__.alias ~ '[captcha]',
type: 'text',
_field_type: 'captcha',
} %}
<div class="{{ __SELF__.classNames('form-control--captcha') }}">
{% partial __SELF__ ~ '::label' field=field %}
<img
class="{{ __SELF__.classNames('form-captcha-img') }}"
src="{{ __SELF__.captcha.img }}" alt="Captcha"
/>
<a class="{{ __SELF__.classNames('form-regenerate-captcha') }}" href="#" data-request="{{ __SELF__ }}::onRegenerateCaptcha">
{{ 'offline.forms::lang.captcha_regenerate' | trans }}
</a>
</div>
<input type="hidden" name="{{ __SELF__.alias }}[captcha_key]" value="{{ __SELF__.captcha.key }}">
<input
class="{{ __SELF__.classNames('form-control', 'form-control--' ~ field.type) }}"
type="{{ field.type }}"
name="{{ field.id }}"
id="{{ field.id }}"
{% if field.placeholder %}
placeholder="{{ field.placeholder }}"
{% endif %}
>