mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 02:48:45 -04:00
Remove ConfirmMobileNumberForm
It’s exactly the same code as `TwoFactorForm` was.
This commit is contained in:
@@ -493,19 +493,6 @@ class ChangeMobileNumberForm(StripWhitespaceForm):
|
||||
mobile_number = international_phone_number()
|
||||
|
||||
|
||||
class ConfirmMobileNumberForm(StripWhitespaceForm):
|
||||
def __init__(self, validate_code_func, *args, **kwargs):
|
||||
self.validate_code_func = validate_code_func
|
||||
super(ConfirmMobileNumberForm, self).__init__(*args, **kwargs)
|
||||
|
||||
sms_code = sms_code()
|
||||
|
||||
def validate_sms_code(self, field):
|
||||
is_valid, msg = self.validate_code_func(field.data)
|
||||
if not is_valid:
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
||||
class ChooseTimeForm(StripWhitespaceForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -18,8 +18,8 @@ from app.main.forms import (
|
||||
ChangeMobileNumberForm,
|
||||
ChangeNameForm,
|
||||
ChangePasswordForm,
|
||||
ConfirmMobileNumberForm,
|
||||
ConfirmPasswordForm,
|
||||
TwoFactorForm,
|
||||
)
|
||||
from app.utils import is_gov_user
|
||||
|
||||
@@ -169,7 +169,7 @@ def user_profile_mobile_number_confirm():
|
||||
if NEW_MOBILE_PASSWORD_CONFIRMED not in session:
|
||||
return redirect(url_for('.user_profile_mobile_number'))
|
||||
|
||||
form = ConfirmMobileNumberForm(_check_code)
|
||||
form = TwoFactorForm(_check_code)
|
||||
|
||||
if form.validate_on_submit():
|
||||
user = user_api_client.get_user(current_user.id)
|
||||
|
||||
Reference in New Issue
Block a user