we don't want dom id systematically tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 07 Apr 2009 19:53:49 +0200
branchtls-sprint
changeset 1274 b730932a79b7
parent 1273 64e1db70161b
child 1275 441201a5c13f
we don't want dom id systematically
web/formrenderers.py
--- a/web/formrenderers.py	Tue Apr 07 19:53:24 2009 +0200
+++ b/web/formrenderers.py	Tue Apr 07 19:53:49 2009 +0200
@@ -108,8 +108,10 @@
             action = form.req.build_url('edit')
         else:
             action = form.action
-        tag = ('<form action="%s" method="post" id="%s" enctype="%s"' % (
-            html_escape(action or '#'), form.domid, enctype))
+        tag = ('<form action="%s" method="post" enctype="%s"' % (
+            html_escape(action or '#'), enctype))
+        if form.domid:
+            tag += ' id="%s"' % form.domid
         if form.onsubmit:
             tag += ' onsubmit="%s"' % html_escape(form.onsubmit % dictattr(form))
         if form.cssstyle: