Commits

James Crasta committed c232884

Remove extra colon from FieldList which makes styling more difficult. Fixes #166.

Comments (0)

Files changed (2)

         # 'field' so that is what we will give it
         field = DummyField([DummyField(x, label='l' + x) for x in ['foo', 'bar']], id='hai')
 
-        self.assertEqual(ListWidget()(field), '<ul id="hai"><li>lfoo: foo</li><li>lbar: bar</li></ul>')
+        self.assertEqual(ListWidget()(field), '<ul id="hai"><li>lfoo foo</li><li>lbar bar</li></ul>')
 
         w = ListWidget(html_tag='ol', prefix_label=False)
         self.assertEqual(w(field), '<ol id="hai"><li>foo lfoo</li><li>bar lbar</li></ol>')

wtforms/widgets/core.py

         html = ['<%s %s>' % (self.html_tag, html_params(**kwargs))]
         for subfield in field:
             if self.prefix_label:
-                html.append('<li>%s: %s</li>' % (subfield.label, subfield()))
+                html.append('<li>%s %s</li>' % (subfield.label, subfield()))
             else:
                 html.append('<li>%s %s</li>' % (subfield(), subfield.label))
         html.append('</%s>' % self.html_tag)
     If `with_table_tag` is True, then an enclosing <table> is placed around the
     rows.
 
-    Hidden fields will not be displayed with a row, instead the field will be 
+    Hidden fields will not be displayed with a row, instead the field will be
     pushed into a subsequent table row to ensure XHTML validity. Hidden fields
     at the end of the field list will appear outside the table.
     """
     def __init__(self, hide_value=True):
         self.hide_value = hide_value
 
-    def __call__(self, field, **kwargs): 
+    def __call__(self, field, **kwargs):
         if self.hide_value:
             kwargs['value'] = ''
         return super(PasswordInput, self).__call__(field, **kwargs)
 
     def __call__(self, field, **kwargs):
         if field.checked:
-            kwargs['checked'] = True 
+            kwargs['checked'] = True
         return super(RadioInput, self).__call__(field, **kwargs)
 
 
     """
     input_type = 'submit'
 
-    def __call__(self, field, **kwargs): 
+    def __call__(self, field, **kwargs):
         kwargs.setdefault('value', field.label.text)
         return super(SubmitInput, self).__call__(field, **kwargs)
 
 
     `rows` and `cols` ought to be passed as keyword args when rendering.
     """
-    def __call__(self, field, **kwargs): 
+    def __call__(self, field, **kwargs):
         kwargs.setdefault('id', field.id)
         return HTMLString('<textarea %s>%s</textarea>' % (html_params(name=field.name, **kwargs), escape(text_type(field._value()))))
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.