# HG changeset patch
# User sylvain.thenault@logilab.fr
# Date 1242198806 -7200
# Node ID 21d1db460cdbd65ec00fad58d645f2ada75c3050
# Parent 8bd788149f85157702bd91156d0d2e0ea9f42baa# Parent bb9538d914651acfff4140b5083fe7f4ac7e7337
merge
diff -r 8bd788149f85 -r 21d1db460cdb web/formwidgets.py
--- a/web/formwidgets.py Wed May 13 09:09:50 2009 +0200
+++ b/web/formwidgets.py Wed May 13 09:13:26 2009 +0200
@@ -173,14 +173,20 @@
if not 'size' in attrs and self._multiple:
attrs['size'] = '5'
options = []
+ optgroup_opened = False
for label, value in field.vocabulary(form):
if value is None:
# handle separator
- options.append(u'' % (label or ''))
+ if optgroup_opened:
+ options.append(u'')
+ options.append(u'')
return tags.select(name=name, multiple=self._multiple,
options=options, **attrs)