# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1235147890 -3600 # Node ID 136d91725ecf5cf20cc0116e3541686bc7390e38 # Parent 192800415f596127bb5075fa3c67d55f6bdfc2af confirmation in password widget diff -r 192800415f59 -r 136d91725ecf web/form.py --- a/web/form.py Fri Feb 20 17:20:53 2009 +0100 +++ b/web/form.py Fri Feb 20 17:38:10 2009 +0100 @@ -292,7 +292,16 @@ class PasswordInput(Input): type = 'password' - # XXX password validation + + def render(self, form, field): + self.add_media(form) + name, values, attrs = self._render_attrs(form, field) + inputs = [tags.input(name=name, value=value, type=self.type, **attrs), + '
', + tags.input(name=name+'-confirm', type=self.type, **attrs), + ' ', tags.span(form.req._('confirm password'), + **{'class': 'emphasis'})] + return u'\n'.join(inputs) class FileInput(Input): type = 'file'