surrounding div necessary for proper error localization
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 Jan 2010 16:48:41 +0100
changeset 4376 839b28a3652e
parent 4375 6d34e3cf60a3
child 4377 0e9cf6593382
surrounding div necessary for proper error localization
web/formwidgets.py
--- a/web/formwidgets.py	Tue Jan 26 16:48:06 2010 +0100
+++ b/web/formwidgets.py	Tue Jan 26 16:48:41 2010 +0100
@@ -747,7 +747,9 @@
         attrs.setdefault('onkeyup', 'autogrow(this)')
         inputs += [tags.textarea(fqs, name=fqsqname, **attrs),
                    u'</td></tr></table>']
-        return u'\n'.join(inputs)
+        # surrounding div necessary for proper error localization
+        return u'<div id="%s">%s%s</div>' % (
+            field.dom_id(form), u'\n'.join(inputs))
 
     def process_field_data(self, form, field):
         req = form._cw