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:55:31 +00:00
parent 34c2c3b47c
commit 9a1a328aca
6 changed files with 26 additions and 12 deletions
@@ -48,7 +48,7 @@
</nav>
<h2 class="heading-medium">Authentication</h2>
<p class="govuk-body">{{ user.auth_type }}</p>
<p class="govuk-body">{{ user.auth_type | format_auth_type }}</p>
{% if user.auth_type != 'webauthn_auth' %}
<a class="govuk-link govuk-link" href="{{ url_for('main.change_user_auth', user_id=user.id) }}">
Change authentication for this user