show.html.haml 843 B

1234567891011121314151617181920212223242526
  1. - content_for :page_title do
  2. = t('settings.two_factor_authentication')
  3. .simple_form
  4. %p.hint
  5. = t('two_factor_authentication.description_html')
  6. - if current_user.otp_required_for_login
  7. = link_to t('two_factor_authentication.disable'),
  8. settings_two_factor_authentication_path,
  9. data: { method: :delete },
  10. class: 'block-button'
  11. - else
  12. = link_to t('two_factor_authentication.setup'),
  13. settings_two_factor_authentication_path,
  14. data: { method: :post },
  15. class: 'block-button'
  16. - if current_user.otp_required_for_login
  17. .simple_form
  18. %p.hint
  19. = t('two_factor_authentication.lost_recovery_codes')
  20. = link_to t('two_factor_authentication.generate_recovery_codes'),
  21. settings_two_factor_authentication_recovery_codes_path,
  22. data: { method: :post },
  23. class: 'block-button'