Merge pull request #1648 from alphagov/add-hint-user-no-phone

Add a hint to explain why SMS auth is unavailable
This commit is contained in:
Chris Hill-Scott
2017-11-16 10:20:51 +00:00
committed by GitHub
2 changed files with 23 additions and 3 deletions

View File

@@ -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 hasnt added a phone&nbsp;number to their profile'|safe}
) }}
{% else %}
{{ radios(form.login_authentication) }}
{% endif %}
{% endif %}