Make it so that form fields and descriptions are actually translated

This commit is contained in:
Christopher Allan Webber 2011-08-10 10:50:42 -05:00
parent 1c266dc328
commit db3e058349

View File

@ -19,9 +19,9 @@
{# Generically render a field #} {# Generically render a field #}
{% macro render_field_div(field) %} {% macro render_field_div(field) %}
<div class="form_field_box"> <div class="form_field_box">
<div class="form_field_label">{{ field.label }}</div> <div class="form_field_label">{{ _(field.label.text) }}</div>
{% if field.description -%} {% if field.description -%}
<div class="form_field_description">{{ field.description }}</div> <div class="form_field_description">{{ _(field.description) }}</div>
{%- endif %} {%- endif %}
<div class="form_field_input">{{ field }}</div> <div class="form_field_input">{{ field }}</div>
{%- if field.errors -%} {%- if field.errors -%}
@ -38,9 +38,9 @@
# ... mostly the same thing except it includes rows and cols #} # ... mostly the same thing except it includes rows and cols #}
{% macro render_textarea_div(field, rows=8, cols=20) %} {% macro render_textarea_div(field, rows=8, cols=20) %}
<div class="form_field_box"> <div class="form_field_box">
<div class="form_field_label">{{ field.label }}</div> <div class="form_field_label">{{ _(field.label.text) }}</div>
{% if field.description -%} {% if field.description -%}
<div class="form_field_description">{{ field.description }}</div> <div class="form_field_description">{{ _(field.description) }}</div>
{%- endif %} {%- endif %}
<div class="form_field_input">{{ field(rows=rows, cols=cols) }}</div> <div class="form_field_input">{{ field(rows=rows, cols=cols) }}</div>
{%- if field.errors -%} {%- if field.errors -%}
@ -64,7 +64,7 @@
{% macro render_table(form) -%} {% macro render_table(form) -%}
{% for field in form %} {% for field in form %}
<tr> <tr>
<th>{{field.label}}</th> <th>{{ _(field.label.text) }}</th>
<td> <td>
{{field}} {{field}}
{% if field.errors %} {% if field.errors %}