web/formrenderers.py
branchtls-sprint
changeset 1274 b730932a79b7
parent 1181 620ec8e6ae19
child 1291 22b4d300d18d
equal deleted inserted replaced
1273:64e1db70161b 1274:b730932a79b7
   106             enctype = 'application/x-www-form-urlencoded'
   106             enctype = 'application/x-www-form-urlencoded'
   107         if form.action is None:
   107         if form.action is None:
   108             action = form.req.build_url('edit')
   108             action = form.req.build_url('edit')
   109         else:
   109         else:
   110             action = form.action
   110             action = form.action
   111         tag = ('<form action="%s" method="post" id="%s" enctype="%s"' % (
   111         tag = ('<form action="%s" method="post" enctype="%s"' % (
   112             html_escape(action or '#'), form.domid, enctype))
   112             html_escape(action or '#'), enctype))
       
   113         if form.domid:
       
   114             tag += ' id="%s"' % form.domid
   113         if form.onsubmit:
   115         if form.onsubmit:
   114             tag += ' onsubmit="%s"' % html_escape(form.onsubmit % dictattr(form))
   116             tag += ' onsubmit="%s"' % html_escape(form.onsubmit % dictattr(form))
   115         if form.cssstyle:
   117         if form.cssstyle:
   116             tag += ' style="%s"' % html_escape(form.cssstyle)
   118             tag += ' style="%s"' % html_escape(form.cssstyle)
   117         if form.cssclass:
   119         if form.cssclass: