password widget should use the same value as main field for the confirm, else if we don't notice that we got a validation error while no password modification has been done tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 08 Apr 2009 13:17:32 +0200
branchtls-sprint
changeset 1294 870bc725cc9a
parent 1293 aae1516b6426
child 1295 3012c655a94d
password widget should use the same value as main field for the confirm, else if we don't notice that we got a validation error while no password modification has been done
web/formwidgets.py
--- a/web/formwidgets.py	Wed Apr 08 13:16:24 2009 +0200
+++ b/web/formwidgets.py	Wed Apr 08 13:17:32 2009 +0200
@@ -74,7 +74,7 @@
         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=confirmname, type=self.type, **attrs),
+                  tags.input(name=confirmname, value=values[0], type=self.type, **attrs),
                   '&nbsp;', tags.span(form.req._('confirm password'),
                                       **{'class': 'emphasis'})]
         return u'\n'.join(inputs)