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:
Chris Hill-Scott
2022-03-14 14:39:54 +00:00
parent 34c2c3b47c
commit 9a1a328aca
6 changed files with 26 additions and 12 deletions

View File

@@ -40,6 +40,7 @@ from app.config import configs
from app.extensions import antivirus_client, redis_client, zendesk_client
from app.formatters import (
convert_to_boolean,
format_auth_type,
format_billions,
format_date,
format_date_human,
@@ -527,6 +528,7 @@ def setup_event_handlers():
def add_template_filters(application):
for fn in [
format_auth_type,
format_billions,
format_datetime,
format_datetime_24h,