X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftemplates%2Fmediagoblin%2Futils%2Fwtforms.html;h=58ecb8e092f01df9cac725aed9dac7733396bc78;hb=dc0b39b74741e7f4a7ba975c7ee98953bbf38816;hp=1d2f86199cf1345f2ebfd97dd1069aaafc071d5d;hpb=4765a52b1f1481026079ea7f7a6ecbb65f0fcac1;p=mediagoblin.git diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html index 1d2f8619..58ecb8e0 100644 --- a/mediagoblin/templates/mediagoblin/utils/wtforms.html +++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html @@ -1,6 +1,6 @@ {# # GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 Free Software Foundation, Inc +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -18,37 +18,18 @@ {# Generically render a field #} {% macro render_field_div(field) %} -
-
{{ field.label }}
- {% if field.description -%} -
{{ field.description }}
- {%- endif %} -
{{ field }}
+ {% if field.label.text -%} +

+ {%- endif %} +
+ {{ field }} {%- if field.errors -%} {% for error in field.errors %} -
- {{ error }} -
+

{{ _(error) }}

{% endfor %} {%- endif %} -
-{%- endmacro %} - -{# Generically render a textarea - # ... mostly the same thing except it includes rows and cols #} -{% macro render_textarea_div(field, rows=8, cols=20) %} -
-
{{ field.label }}
{% if field.description -%} -
{{ field.description }}
- {%- endif %} -
{{ field(rows=rows, cols=cols) }}
- {%- if field.errors -%} - {% for error in field.errors %} -
- {{ error }} -
- {% endfor %} +

{{ _(field.description)|safe }}

{%- endif %}
{%- endmacro %} @@ -64,7 +45,7 @@ {% macro render_table(form) -%} {% for field in form %} - {{field.label}} + {{ _(field.label.text) }} {{field}} {% if field.errors %}