--- a/web/formwidgets.py Thu Mar 12 20:45:13 2009 +0100
+++ b/web/formwidgets.py Thu Mar 12 20:45:39 2009 +0100
@@ -70,9 +70,11 @@
self.add_media(form)
name, values, attrs = self._render_attrs(form, field)
assert len(values) == 1
- inputs = [tags.input(name=name, value=values[0], type=self.type, **attrs),
+ id = attrs.pop('id')
+ confirmname = '%s-confirm:%s' % tuple(name.rsplit(':', 1))
+ inputs = [tags.input(name=name, value=values[0], type=self.type, id=id, **attrs),
'<br/>',
- tags.input(name=name+'-confirm', type=self.type, **attrs),
+ tags.input(name=confirmname, type=self.type, **attrs),
' ', tags.span(form.req._('confirm password'),
**{'class': 'emphasis'})]
return u'\n'.join(inputs)