index.html.haml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. - content_for :page_title do
  2. = t('settings.two_factor_authentication')
  3. - content_for :heading_actions do
  4. = link_to t('two_factor_authentication.disable'), disable_settings_two_factor_authentication_methods_path, class: 'button button--destructive', method: :post
  5. %p.hint
  6. %span.positive-hint
  7. = fa_icon 'check'
  8.  
  9. = t 'two_factor_authentication.enabled'
  10. .table-wrapper
  11. %table.table
  12. %thead
  13. %tr
  14. %th= t('two_factor_authentication.methods')
  15. %th
  16. %tbody
  17. %tr
  18. %td= t('two_factor_authentication.otp')
  19. %td
  20. = table_link_to 'pencil', t('two_factor_authentication.edit'), settings_otp_authentication_path, method: :post
  21. %tr
  22. %td= t('two_factor_authentication.webauthn')
  23. - if current_user.webauthn_enabled?
  24. %td
  25. = table_link_to 'pencil', t('two_factor_authentication.edit'), settings_webauthn_credentials_path, method: :get
  26. - else
  27. %td
  28. = table_link_to 'key', t('two_factor_authentication.add'), new_settings_webauthn_credential_path, method: :get
  29. %hr.spacer/
  30. %h3= t('two_factor_authentication.recovery_codes')
  31. %p.muted-hint= t('two_factor_authentication.lost_recovery_codes')
  32. %hr.spacer/
  33. .simple_form
  34. = link_to t('two_factor_authentication.generate_recovery_codes'), settings_two_factor_authentication_recovery_codes_path, data: { method: :post }, class: 'block-button'