Password Reset now allows for providing passwords when GENERATE_SERVICE_PASSWORD is false

This commit is contained in:
2010-04-03 21:19:39 +01:00
parent 45e303fb4e
commit 96de3cc5eb
3 changed files with 29 additions and 9 deletions

View File

@@ -51,6 +51,13 @@ def UserServiceAccountForm(user):
return ServiceAccountForm
class ServiceAccountResetForm(forms.Form):
def __init__(self, *args, **kwargs):
super(ServiceAccountResetForm, self).__init__(*args, **kwargs)
if not settings.GENERATE_SERVICE_PASSWORD:
self.password = forms.CharField(widget=forms.PasswordInput, label="Password" )
self.fields['password'] = self.password
class RedditAccountForm(forms.Form):
""" Reddit Account Form """