scinote-web/app/views/users/registrations/_2fa_modal.html.erb

39 lines
2 KiB
Text
Raw Normal View History

2020-07-09 23:01:00 +08:00
<div class="modal two-factor-modal" id="twoFactorAuthenticationModal" tabindex="-1" role="dialog" data-backdrop="static">
2020-06-29 16:56:06 +08:00
<div class="modal-dialog" role="document">
<div class="modal-content">
2020-07-01 17:07:33 +08:00
<% if current_user.two_factor_auth_enabled? %>
2020-07-07 18:59:48 +08:00
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
2020-07-07 21:59:02 +08:00
<h2 class="modal-title"><%= t("users.registrations.edit.2fa_modal.disable.title") %></h2>
2020-07-07 18:59:48 +08:00
</div>
2020-07-01 17:07:33 +08:00
<%= form_with(url: users_2fa_disable_path, method: "post", class: "2fa-disable-form") do %>
<div class="modal-body">
2020-07-07 21:59:02 +08:00
<p><%= t("users.registrations.edit.2fa_modal.disable.description") %></p>
2020-07-01 17:07:33 +08:00
<div class="sci-input-container password-field">
2020-07-07 21:59:02 +08:00
<%= label_tag :password, t("users.registrations.edit.2fa_modal.disable.password_label") %>
2020-07-01 17:07:33 +08:00
<%= password_field_tag :password, '', class: "sci-input-field" %>
</div>
</div>
<div class="modal-footer">
2020-07-07 21:59:02 +08:00
<%= button_tag t("users.registrations.edit.2fa_modal.disable.disable_2fa"), type: 'submit', class: "btn btn-danger" %>
2020-07-01 17:07:33 +08:00
</div>
<% end %>
<% else %>
2020-07-07 18:59:48 +08:00
<ul class="nav nav-tabs hidden">
<li role="presentation"><a href="#2fa-step-1" data-toggle="tab" data-no-turbolink="true"></a></li>
<li role="presentation"><a href="#2fa-step-2" data-toggle="tab" data-no-turbolink="true"></a></li>
<li role="presentation"><a href="#2fa-step-3" data-toggle="tab" data-no-turbolink="true"></a></li>
2020-07-09 23:01:00 +08:00
<li role="presentation"><a href="#2fa-step-4" data-toggle="tab" data-no-turbolink="true"></a></li>
2020-07-07 18:59:48 +08:00
</ul>
<div class="tab-content">
<%= render partial: '2fa_modal_apps_tab' %>
<%= render partial: '2fa_modal_qr_code_tab' %>
<%= render partial: '2fa_modal_verify_code_tab' %>
2020-07-09 23:01:00 +08:00
<%= render partial: '2fa_modal_recovery_codes_tab' %>
2020-07-01 17:07:33 +08:00
</div>
<% end %>
2020-06-29 16:56:06 +08:00
</div>
</div>
</div>
2020-06-29 16:57:41 +08:00