--- 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),
+ '<br/>',
+ 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'