<%inherit file="base/root.mako"/>

<%def name="title()"> ${_('Setup 2FA')} %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif

% if c.rhodecode_name:
${h.branding(c.rhodecode_name)}
% endif

# ${_('Set up the authenticator app')} - ${_('scan the QR code')}

${h.secure_form(h.route_path('setup_2fa'), request=request, id='totp_form')} ${_('Use an authenticator app to scan.')}

## QR CODE `${_('Account')}: ${totp_name}`
${_('Unable to scan?')} ${_('Click here')}

## Secret alternative code
${_('Copy and use this code to manually set up an authenticator app')} `${key}`
`${_('type')}: time-based`
${_('Verify the code from the app')}: ${h.text('totp', class_='form-control', )}
% if 'totp' in errors: ${errors.get('totp')}
% endif % if 'secret_totp' in errors: SECRET:${errors.get('secret_totp')}
% endif
${h.hidden('secret_totp', key)} ${h.submit('verify_2fa',_('Verify'), class_="btn sign-in")}

${h.end_form()}