debian-mirror-gitlab/app/views/authentication/_authenticate.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.3 KiB
Text
Raw Normal View History

2020-06-23 00:09:42 +05:30
#js-authenticate-token-2fa
2023-06-20 00:43:36 +05:30
= render Pajamas::ButtonComponent.new(variant: :confirm,
block: true,
button_options: { id: 'js-login-2fa-device' }) do
= _("Sign in via 2FA code")
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-06-23 00:09:42 +05:30
%script#js-authenticate-token-2fa-in-progress{ type: "text/template" }
2019-02-15 15:39:39 +05:30
%p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.")
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-06-23 00:09:42 +05:30
%script#js-authenticate-token-2fa-error{ type: "text/template" }
%div
2020-11-24 15:15:51 +05:30
%p <%= error_message %> (<%= error_name %>)
2023-06-20 00:43:36 +05:30
= render Pajamas::ButtonComponent.new(block: true,
button_options: { id: 'js-token-2fa-try-again', class: 'gl-mb-3' }) do
= _("Try again?")
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-06-23 00:09:42 +05:30
%script#js-authenticate-token-2fa-authenticated{ type: "text/template" }
%div
2020-06-23 00:09:42 +05:30
%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|
2023-07-09 08:55:56 +05:30
- if remember_me_enabled? && render_remember_me
2020-06-23 00:09:42 +05:30
- resource_params = params[resource_name].presence || params
= hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0)
= hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"