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

41 lines
1.9 KiB
Text
Raw Normal View History

#js-register-u2f
2018-03-27 19:54:05 +05:30
-# haml-lint:disable InlineJavaScript
%script#js-register-u2f-not-supported{ type: "text/template" }
2019-02-15 15:39:39 +05:30
%p= _("Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer).")
%script#js-register-u2f-setup{ type: "text/template" }
- if current_user.two_factor_otp_enabled?
.row.append-bottom-10
2018-03-17 18:26:18 +05:30
.col-md-4
2019-02-15 15:39:39 +05:30
%button#js-setup-u2f-device.btn.btn-info.btn-block= _("Set up new U2F device")
2018-03-17 18:26:18 +05:30
.col-md-8
2019-02-15 15:39:39 +05:30
%p= _("Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left.")
- else
.row.append-bottom-10
2018-03-17 18:26:18 +05:30
.col-md-4
2019-02-15 15:39:39 +05:30
%button#js-setup-u2f-device.btn.btn-info.btn-block{ disabled: true }= _("Set up new U2F device")
2018-03-17 18:26:18 +05:30
.col-md-8
2019-10-12 21:52:04 +05:30
%p= _("You need to register a two-factor authentication app before you can set up a U2F device.")
%script#js-register-u2f-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.")
%script#js-register-u2f-error{ type: "text/template" }
%div
%p
2019-02-15 15:39:39 +05:30
%span <%= error_message %> (#{_("error code:")} <%= error_code %>)
%a.btn.btn-warning#js-u2f-try-again= _("Try again?")
%script#js-register-u2f-registered{ type: "text/template" }
2017-08-17 22:00:37 +05:30
.row.append-bottom-10
2016-09-13 17:45:13 +05:30
.col-md-12
2019-02-15 15:39:39 +05:30
%p= _("Your device was successfully set up! Give it a name and register it with the GitLab server.")
2016-09-13 17:45:13 +05:30
= form_tag(create_u2f_profile_two_factor_auth_path, method: :post) do
.row.append-bottom-10
.col-md-3
2019-02-15 15:39:39 +05:30
= text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: _("Pick a name")
2016-09-13 17:45:13 +05:30
.col-md-3
= hidden_field_tag 'u2f_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
2019-02-15 15:39:39 +05:30
= submit_tag _("Register U2F device"), class: "btn btn-success"