Fixes in passwordform
This commit is contained in:
parent
4d879c4b81
commit
e2621bd4f8
1 changed files with 7 additions and 2 deletions
|
|
@ -66,12 +66,17 @@ class TextForm(BaseForm):
|
||||||
|
|
||||||
class PasswordForm(BaseForm):
|
class PasswordForm(BaseForm):
|
||||||
|
|
||||||
def __init__(self, name, value):
|
def __init__(self, name, value, show_password=False):
|
||||||
super(PasswordForm, self).__init__(name, value)
|
super(PasswordForm, self).__init__(name, value)
|
||||||
self.type='password'
|
self.type='password'
|
||||||
|
self.show_password=show_password
|
||||||
|
|
||||||
def setform(self, value):
|
def setform(self, value):
|
||||||
return ""
|
if not self.show_password:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
else:
|
||||||
|
return value
|
||||||
|
|
||||||
class HiddenForm(BaseForm):
|
class HiddenForm(BaseForm):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue