Added translation to placeholder and title attributes
This commit is contained in:
parent
27b4774ff3
commit
23bad292ee
@ -289,7 +289,7 @@
|
||||
{% block widget_attributes %}
|
||||
{% spaceless %}
|
||||
id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
|
||||
{% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %}
|
||||
{% for attrname,attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{attrname}}="{{attrvalue|trans({}, translation_domain)}}" {% else %}{{attrname}}="{{attrvalue}}" {% endif %}{% endfor %}
|
||||
{% endspaceless %}
|
||||
{% endblock widget_attributes %}
|
||||
|
||||
|
Reference in New Issue
Block a user