Skip to content

Commit

Permalink
Support translation of prepend/append
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 4, 2016
1 parent 090ee42 commit 02656f4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions templates/forms/fields/text/text.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{% block prepend %}
{% if field.prepend %}
<div class="form-input-addon form-input-prepend">
{{ field.prepend|raw }}
{% if grav.twig.twig.filters['tu'] is defined %}
{{- field.prepend|tu|raw -}}
{% else %}
{{- field.prepend|t|raw -}}
{% endif %}
</div>
{% endif %}
{% endblock %}
Expand All @@ -16,7 +20,11 @@
{% block append %}
{% if field.append %}
<div class="form-input-addon form-input-append">
{{ field.append|raw }}
{% if grav.twig.twig.filters['tu'] is defined %}
{{- field.append|tu|raw -}}
{% else %}
{{- field.append|t|raw -}}
{% endif %}
</div>
{% endif %}
{% endblock %}
Expand Down

0 comments on commit 02656f4

Please sign in to comment.