new.html.haml 831 B

1234567891011121314151617181920212223
  1. - content_for :page_title do
  2. = t('settings.two_factor_authentication')
  3. = simple_form_for @confirmation, url: settings_two_factor_authentication_confirmation_path, method: :post do |f|
  4. %p.hint= t('otp_authentication.instructions_html')
  5. .qr-wrapper
  6. .qr-code!= @qrcode.as_svg(padding: 0, module_size: 4)
  7. .qr-alternative
  8. %p.hint= t('otp_authentication.manual_instructions')
  9. %samp.qr-alternative__code= @new_otp_secret.scan(/.{4}/).join(' ')
  10. .fields-group
  11. = f.input :otp_attempt,
  12. hint: t('otp_authentication.code_hint'),
  13. input_html: { autocomplete: 'off' },
  14. label: t('simple_form.labels.defaults.otp_attempt'),
  15. required: true,
  16. wrapper: :with_label
  17. .actions
  18. = f.button :button, t('otp_authentication.enable'), type: :submit