mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Make listing of keys on user profile a bit nicer
We can use the `optional_text_field` macro to grey out the text when nothing is set up. And adding ‘registered’ makes the language consistent through to the next page.
This commit is contained in:
@@ -48,7 +48,10 @@
|
||||
{% if current_user.platform_admin %}
|
||||
{% call row(id='security-keys') %}
|
||||
{{ text_field('Security keys') }}
|
||||
{{ text_field(current_user.webauthn_credentials|length) }}
|
||||
{{ optional_text_field(
|
||||
('{} registered'.format(current_user.webauthn_credentials|length)) if current_user.webauthn_credentials else None,
|
||||
default='None registered'
|
||||
) }}
|
||||
{{ edit_field('Change', url_for('.user_profile_security_keys')) }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user