diff roundup/cgi/templating.py @ 1144:db13f46cb5f9

password edit now has a confirmation field registration error punts back to register page
author Richard Jones <richard@users.sourceforge.net>
date Sun, 15 Sep 2002 22:41:15 +0000
parents 7e193bbda38e
children 7e0024954954
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri Sep 13 08:20:13 2002 +0000
+++ b/roundup/cgi/templating.py	Sun Sep 15 22:41:15 2002 +0000
@@ -767,10 +767,18 @@
         return _('*encrypted*')
 
     def field(self, size = 30):
-        ''' Render a form edit field for the property
+        ''' Render a form edit field for the property.
         '''
         return '<input type="password" name="%s" size="%s">'%(self._name, size)
 
+    def confirm(self, size = 30):
+        ''' Render a second form edit field for the property, used for 
+            confirmation that the user typed the password correctly. Generates
+            a field with name "name:confirm".
+        '''
+        return '<input type="password" name="%s:confirm" size="%s">'%(
+            self._name, size)
+
 class NumberHTMLProperty(HTMLProperty):
     def plain(self):
         ''' Render a "plain" representation of the property

Roundup Issue Tracker: http://roundup-tracker.org/