mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Format auth_type in a consistent way in the UI
On the ‘find user’ page it says ‘sms_auth’ instead of ‘Text message code’. This commit fixes that, and adds a handy formatter so it’s easier to do the right thing in the future.
This commit is contained in:
@@ -50,7 +50,11 @@ from wtforms.validators import (
|
||||
Regexp,
|
||||
)
|
||||
|
||||
from app.formatters import format_thousands, guess_name_from_email_address
|
||||
from app.formatters import (
|
||||
format_auth_type,
|
||||
format_thousands,
|
||||
guess_name_from_email_address,
|
||||
)
|
||||
from app.main.validators import (
|
||||
BroadcastLength,
|
||||
CommonlyUsedPassword,
|
||||
@@ -1021,8 +1025,8 @@ class AuthTypeForm(StripWhitespaceForm):
|
||||
auth_type = GovukRadiosField(
|
||||
'Sign in using',
|
||||
choices=[
|
||||
('sms_auth', 'Text message code'),
|
||||
('email_auth', 'Email link'),
|
||||
('sms_auth', format_auth_type('sms_auth')),
|
||||
('email_auth', format_auth_type('email_auth')),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user