File: _authenticate.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (27 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#js-authenticate-token-2fa

= render Pajamas::ButtonComponent.new(variant: :confirm,
  block: true,
  button_options: { id: 'js-login-2fa-device' }) do
  = _("Sign in via 2FA code")

-# haml-lint:disable InlineJavaScript
%script#js-authenticate-token-2fa-in-progress{ type: "text/template" }
  %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.")

-# haml-lint:disable InlineJavaScript
%script#js-authenticate-token-2fa-error{ type: "text/template" }
  .gl-mb-3
    %p <%= error_message %> (<%= error_name %>)
    = render Pajamas::ButtonComponent.new(block: true, button_options: { id: 'js-token-2fa-try-again' }) do
      = _("Try again?")

-# haml-lint:disable InlineJavaScript
%script#js-authenticate-token-2fa-authenticated{ type: "text/template" }
  %div
    %p= _("We heard back from your device. You have been authenticated.")
    = gitlab_ui_form_for(:user, url: target_path, method: :post, html: { id: 'js-login-token-2fa-form' }) do |f|
      - if render_remember_me
        - user_params = params[:user].presence || params
        = f.hidden_field :remember_me, value: user_params.fetch(:remember_me, 0)
      = f.hidden_field :device_response, value: nil, id: 'js-device-response'