Use wtforms_util.render_field_div more in media_collect.html
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Mon, 4 Feb 2013 20:25:01 +0000 (21:25 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 22 Feb 2013 13:23:16 +0000 (14:23 +0100)
If we have to render fields individually, we still can use
wtforms_util.render_field_div for each field. Makes things
much smaller and readable.

mediagoblin/templates/mediagoblin/user_pages/media_collect.html

index 8b19e8c03d3ad8388ca4d02d54786d2d38cb0b19..159eeeb4bfe4f44515c2717c1378a68f11da79b6 100644 (file)
@@ -47,7 +47,7 @@
       </div>
 
       <br />
-         
+
       <p class="form_field_label">
        <label for="{{ (form.collection.name) }}">{{ _(form.collection.label.text) }}</label>
       </p>
       <div id="new_collection" class="subform">
         <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>
-      </p>
-      <div class="form_field_input">
-       {{ form.collection_title }}
-      </div>
+        {{- wtforms_util.render_field_div(form.collection_title) }}
         {{- wtforms_util.render_field_div(form.collection_description) }}
       </div>
-      <p class="form_field_label"> 
-       <label for="{{ (form.note.name) }}">{{ _(form.note.label.text) }}</label>
-      </p>
-      <div class="form_field_input">
-       {{ form.note }}
-      </div>
+      {{- wtforms_util.render_field_div(form.note) }}
 
       <div class="form_submit_buttons">
         {# TODO: This isn't a button really... might do unexpected things :) #}