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

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

41 lines
1.7 KiB
Text
Raw Normal View History

2020-11-24 15:15:51 +05:30
#js-register-token-2fa
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-11-24 15:15:51 +05:30
%script#js-register-2fa-message{ type: "text/template" }
%p <%= message %>
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-11-24 15:15:51 +05:30
%script#js-register-token-2fa-setup{ type: "text/template" }
- if current_user.two_factor_otp_enabled?
.row.gl-mb-3
.col-md-5
2021-03-11 19:13:27 +05:30
%button#js-setup-token-2fa-device.gl-button.btn.btn-confirm= _("Set up new device")
2020-11-24 15:15:51 +05:30
.col-md-7
%p= _("Your device needs to be set up. Plug it in (if needed) and click the button on the left.")
- else
.row.gl-mb-3
.col-md-4
2021-03-11 19:13:27 +05:30
%button#js-setup-token-2fa-device.gl-button.btn.btn-confirm.btn-block{ disabled: true }= _("Set up new device")
2020-11-24 15:15:51 +05:30
.col-md-8
%p= _("You need to register a two-factor authentication app before you can set up a device.")
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-11-24 15:15:51 +05:30
%script#js-register-token-2fa-error{ type: "text/template" }
%div
%p
%span <%= error_message %> (<%= error_name %>)
2021-04-29 21:17:54 +05:30
%a.btn.btn-default.gl-button#js-token-2fa-try-again= _("Try again?")
2020-11-24 15:15:51 +05:30
2021-11-18 22:05:49 +05:30
-# haml-lint:disable InlineJavaScript
2020-11-24 15:15:51 +05:30
%script#js-register-token-2fa-registered{ type: "text/template" }
.row.gl-mb-3
.col-md-12
%p= _("Your device was successfully set up! Give it a name and register it with the GitLab server.")
= form_tag(target_path, method: :post) do
.row.gl-mb-3
.col-md-3
= text_field_tag 'device_registration[name]', nil, class: 'form-control', placeholder: _("Pick a name")
.col-md-3
= hidden_field_tag 'device_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
2021-04-29 21:17:54 +05:30
= submit_tag _("Register device"), class: "gl-button btn btn-confirm"