Added translation to placeholder and title attributes

This commit is contained in:
André Neves 2012-05-03 13:17:09 +01:00
parent 27b4774ff3
commit 23bad292ee

View File

@ -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 %}