|
|
|
@ -7,7 +7,6 @@ from common.utils import validate_ssh_public_key
|
|
|
|
|
from authentication.forms import EncryptedField, CaptchaMixin |
|
|
|
|
from ..models import User |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [ |
|
|
|
|
'UserProfileForm', 'UserMFAForm', 'UserFirstLoginFinishForm', |
|
|
|
|
'UserPasswordForm', 'UserPublicKeyForm', 'FileForm', |
|
|
|
@ -45,7 +44,6 @@ UserProfileForm.verbose_name = _("Profile")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UserMFAForm(forms.ModelForm): |
|
|
|
|
|
|
|
|
|
mfa_description = _( |
|
|
|
|
'When enabled, ' |
|
|
|
|
'you will enter the MFA binding process the next time you log in. ' |
|
|
|
@ -100,6 +98,7 @@ class UserTokenResetPasswordForm(forms.Form):
|
|
|
|
|
|
|
|
|
|
class UserForgotPasswordForm(forms.Form): |
|
|
|
|
email = forms.CharField(label=_("Email"), required=False) |
|
|
|
|
country_code = forms.CharField(required=False) |
|
|
|
|
sms = forms.CharField( |
|
|
|
|
label=_('SMS'), required=False, |
|
|
|
|
help_text=_('The phone number must contain an area code, for example, +86') |
|
|
|
|