Skip to content

Commit

Permalink
captcha localization
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Apr 8, 2020
1 parent 6eb0445 commit ab1f565
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion django_form_builder/dynamic_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def __init__(self, *args, **kwargs):
hidden_field="id_{}".format(self.captcha_hidden.name))
self.captcha.label = parent_label
self.captcha.name = "{}_dyn".format(format_field_name(parent_label))
self.captcha.help_text = _("CaPTCHA: insert the value represented in the Image")
self.captcha.help_text = _("CaPTCHA: inserisci i caratteri/numeri raffigurati nell'immagine")
self.captcha.parent = self
# super().__init__(*args, **kwargs)

Expand Down
4 changes: 3 additions & 1 deletion django_form_builder/templates/widgets/captcha.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% load i18n %}

<div>
<img class="captcha_dyn_form"
id="{{ widget.name }}_img"
src="data:image/png;base64,{{ image_b64 }}" />
<a onclick="refresh_captcha();">{% trans "Aggiorna" %}</a>
</div>
<br>
<input type="{{ widget.type }}"
name="{{ widget.name }}"
value="{{ widget.value | stringformat:'s' }}"
{% include "django/forms/widgets/attrs.html" %}>
<a onclick="refresh_captcha();">refresh</a>
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='django-form-builder',
version='0.9.1',
version='0.9.2',
packages=find_packages(),
include_package_data=True,
license='BSD License',
Expand Down

0 comments on commit ab1f565

Please sign in to comment.