don't set tabindex if already in attrs tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 07 Apr 2009 19:53:24 +0200
branchtls-sprint
changeset 1273 64e1db70161b
parent 1272 e710fc46c6a0
child 1274 b730932a79b7
don't set tabindex if already in attrs
web/formwidgets.py
--- a/web/formwidgets.py	Tue Apr 07 19:53:03 2009 +0200
+++ b/web/formwidgets.py	Tue Apr 07 19:53:24 2009 +0200
@@ -43,7 +43,7 @@
         attrs = dict(self.attrs)
         if self.setdomid:
             attrs['id'] = form.context[field]['id']
-        if self.settabindex:
+        if self.settabindex and not 'tabindex' in attrs:
             attrs['tabindex'] = form.req.next_tabindex()
         return name, values, attrs
 
@@ -226,5 +226,3 @@
         self.add_media(form)
         attrs = self._render_attrs(form, field)[-1]
         return tags.div(**attrs)
-
-# XXX backport PropertyKeyWidget and PropertyValueWidget