web/form.py
branchtls-sprint
changeset 908 136d91725ecf
parent 907 192800415f59
child 911 467fb77c6a33
--- 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),
+                  '&nbsp;', tags.span(form.req._('confirm password'),
+                                      **{'class': 'emphasis'})]
+        return u'\n'.join(inputs)
 
 class FileInput(Input):
     type = 'file'