2020-06-03 21:08:23 +00:00
|
|
|
#js-authenticate-token-2fa
|
2021-04-10 03:09:09 +00:00
|
|
|
%a.gl-button.btn.btn-block.btn-confirm#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code")
|
2016-06-06 04:50:39 +00:00
|
|
|
|
2020-06-03 21:08:23 +00:00
|
|
|
%script#js-authenticate-token-2fa-in-progress{ type: "text/template" }
|
2018-11-19 19:56:01 +00:00
|
|
|
%p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.")
|
2016-06-06 04:50:39 +00:00
|
|
|
|
2020-06-03 21:08:23 +00:00
|
|
|
%script#js-authenticate-token-2fa-error{ type: "text/template" }
|
2016-06-06 04:50:39 +00:00
|
|
|
%div
|
2020-09-07 12:08:27 +00:00
|
|
|
%p <%= error_message %> (<%= error_name %>)
|
2021-04-10 03:09:09 +00:00
|
|
|
%a.btn.btn-default.gl-button.btn-block#js-token-2fa-try-again= _("Try again?")
|
2016-06-06 04:50:39 +00:00
|
|
|
|
2020-06-03 21:08:23 +00:00
|
|
|
%script#js-authenticate-token-2fa-authenticated{ type: "text/template" }
|
2016-06-06 04:50:39 +00:00
|
|
|
%div
|
2020-06-03 21:08:23 +00:00
|
|
|
%p= _("We heard back from your device. You have been authenticated.")
|
|
|
|
= form_tag(target_path, method: :post, id: 'js-login-token-2fa-form') do |f|
|
|
|
|
- if render_remember_me
|
|
|
|
- resource_params = params[resource_name].presence || params
|
|
|
|
= hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0)
|
2016-06-06 04:50:39 +00:00
|
|
|
= hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
|