# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1239126804 -7200 # Node ID 64e1db70161bca5333c3f02f8ed91436ff8b8504 # Parent e710fc46c6a05f862940e0470b8df1cd24a4daba don't set tabindex if already in attrs diff -r e710fc46c6a0 -r 64e1db70161b 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