mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Add a hint to explain why SMS auth is unavailable
If we’re going to ‘disable’ radio buttons then we should always tell users why the radio button is disabled. This is what we found with the API key choices anyway.
This commit is contained in:
@@ -23,5 +23,13 @@
|
||||
</div>
|
||||
|
||||
{% if service_has_email_auth %}
|
||||
{{ radios(form.login_authentication, disable=['sms_auth' if user_has_no_mobile_number]) }}
|
||||
{% endif %}
|
||||
{% if user_has_no_mobile_number %}
|
||||
{{ radios(
|
||||
form.login_authentication,
|
||||
disable=['sms_auth'],
|
||||
option_hints={'sms_auth': 'Not available because this team member hasn’t added a phone number to their profile'|safe}
|
||||
) }}
|
||||
{% else %}
|
||||
{{ radios(form.login_authentication) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user