[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.19
Steve Alexander
steve@cat-box.net
Mon, 24 Feb 2003 09:50:45 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv16959/src/zope/app/browser/form
Modified Files:
widget.py
Log Message:
Made the password widget not be filled in with data.
=== Zope3/src/zope/app/browser/form/widget.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.18 Fri Feb 21 04:46:09 2003
+++ Zope3/src/zope/app/browser/form/widget.py Mon Feb 24 09:50:44 2003
@@ -357,6 +357,33 @@
"""Password Widget"""
type='password'
+ def __call__(self):
+ displayMaxWidth = self.getValue('displayMaxWidth') or 0
+ if displayMaxWidth > 0:
+ return renderElement(self.getValue('tag'),
+ type = self.getValue('type'),
+ name = self.name,
+ id = self.name,
+ value = '',
+ cssClass = self.getValue('cssClass'),
+ style = self.style,
+ size = self.getValue('displayWidth'),
+ maxlength = displayMaxWidth,
+ extra = self.getValue('extra'))
+ else:
+ return renderElement(self.getValue('tag'),
+ type = self.getValue('type'),
+ name = self.name,
+ id = self.name,
+ value = '',
+ cssClass = self.getValue('cssClass'),
+ style = self.style,
+ size = self.getValue('displayWidth'),
+ extra = self.getValue('extra'))
+
+ def hidden(self):
+ raise NotImplementedError(
+ 'Cannot get a hidden tag for a password field')
class FileWidget(TextWidget):
"""File Widget"""