perf: 支持自定义短信认证

This commit is contained in:
jiangweidong
2023-05-24 17:32:57 +08:00
committed by Jiangjie.Bai
parent 5e7d474bb7
commit 20cc4ea320
9 changed files with 99 additions and 6 deletions

View File

@@ -100,7 +100,10 @@ class UserTokenResetPasswordForm(forms.Form):
class UserForgotPasswordForm(forms.Form):
email = forms.CharField(label=_("Email"), required=False)
sms = forms.CharField(label=_('SMS'), required=False, max_length=11)
sms = forms.CharField(
label=_('SMS'), required=False,
help_text=_('The phone number must contain an area code, for example, +86')
)
code = forms.CharField(label=_('Verify code'), max_length=6, required=False)
form_type = forms.ChoiceField(
choices=[('sms', _('SMS')), ('email', _('Email'))],