You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. - content_for :page_title do
  2. = t('settings.two_factor_authentication')
  3. - if current_user.otp_required_for_login
  4. %p.positive-hint
  5. = fa_icon 'check'
  6. = ' '
  7. = t 'two_factor_authentication.enabled'
  8. %hr/
  9. = simple_form_for @confirmation, url: settings_two_factor_authentication_path, method: :delete do |f|
  10. = f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
  11. .actions
  12. = f.button :button, t('two_factor_authentication.disable'), type: :submit
  13. %hr/
  14. %h6= t('two_factor_authentication.recovery_codes')
  15. %p.muted-hint
  16. = t('two_factor_authentication.lost_recovery_codes')
  17. = link_to t('two_factor_authentication.generate_recovery_codes'),
  18. settings_two_factor_authentication_recovery_codes_path,
  19. data: { method: :post }
  20. - else
  21. .simple_form
  22. %p.hint= t('two_factor_authentication.description_html')
  23. = link_to t('two_factor_authentication.setup'),
  24. settings_two_factor_authentication_path,
  25. data: { method: :post },
  26. class: 'block-button'