Add markdown notice to collection description.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Tue, 12 Feb 2013 23:02:56 +0000 (00:02 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Tue, 12 Feb 2013 23:02:56 +0000 (00:02 +0100)
Use wtforms_util.render_field_div on the collection
description, so that the markdown notice in the wtform is
actually rendered to html.

mediagoblin/templates/mediagoblin/user_pages/media_collect.html
mediagoblin/templates/mediagoblin/utils/wtforms.html

index 8cdb64fe5eeac8378c9c240e28b90eaae619b1a8..8b19e8c03d3ad8388ca4d02d54786d2d38cb0b19 100644 (file)
@@ -57,8 +57,7 @@
       </div>
 
       <div id="new_collection" class="subform">
-
-      <h3>{% trans %}Add a new collection{% endtrans %}</h3>
+        <h3>{% trans %}Add a new collection{% endtrans %}</h3>
 
       <p class="form_field_label"> 
        <label for="{{ (form.collection_title.name) }}">{{ _(form.collection_title.label.text) }}</label>
       <div class="form_field_input">
        {{ form.collection_title }}
       </div>
-      <p class="form_field_label"> 
-       <label for="{{ (form.collection_description.name) }}">{{ _(form.collection_description.label.text) }}</label>
-      </p>
-      <div class="form_field_input">
-       {{ form.collection_description }}
-      </div>   
-
+        {{- wtforms_util.render_field_div(form.collection_description) }}
       </div>
       <p class="form_field_label"> 
        <label for="{{ (form.note.name) }}">{{ _(form.note.label.text) }}</label>
index 58ecb8e092f01df9cac725aed9dac7733396bc78..df2354eda0e9c67e00dafc19166ab5327f22ea28 100644 (file)
@@ -28,7 +28,7 @@
         <p class="form_field_error">{{ _(error) }}</p>
       {% endfor %}
     {%- endif %}
-    {% if field.description -%}
+    {%- if field.description %}
       <p class="form_field_description">{{ _(field.description)|safe }}</p>
     {%- endif %}
   </div>