From 1e0ea3905edaa35cdccb546f0e68741eca753964 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 9 Apr 2024 16:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81=E7=A0=81=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/forms/profile.py | 3 +-- apps/users/templates/users/forgot_password.html | 2 ++ apps/users/views/profile/reset.py | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/users/forms/profile.py b/apps/users/forms/profile.py index 48dcb6220..9a99c74fd 100644 --- a/apps/users/forms/profile.py +++ b/apps/users/forms/profile.py @@ -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') diff --git a/apps/users/templates/users/forgot_password.html b/apps/users/templates/users/forgot_password.html index cdb32dca2..21cf4906b 100644 --- a/apps/users/templates/users/forgot_password.html +++ b/apps/users/templates/users/forgot_password.html @@ -78,6 +78,7 @@ +86