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">
|
2023-08-17 19:55:17 +08:00
|
|
|
<button type="button" class="close" data-dismiss="modal"><i class="sn-icon sn-icon-close"></i></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>
|
2023-07-11 15:22:42 +08:00
|
|
|
<%= form_with(url: main_app.users_2fa_disable_path, method: "post", class: "2fa-disable-form", html: { data: { remote: true } }) do %>
|
2020-07-01 17:07:33 +08:00
|
|
|
<div class="modal-body">
|
2020-07-07 21:59:02 +08:00
|
|
|
<p><%= t("users.registrations.edit.2fa_modal.disable.description") %></p>
|
2023-02-06 18:17:57 +08:00
|
|
|
<%= label_tag :password, t("users.registrations.edit.2fa_modal.disable.password_label") %>
|
2023-09-13 19:47:54 +08:00
|
|
|
<div class="sci-input-container password-field password-input-container">
|
|
|
|
<div class="password-icon-wrapper">
|
|
|
|
<%= password_field_tag :password, '', class: "sci-input-field" %>
|
|
|
|
</div>
|
2020-07-01 17:07:33 +08:00
|
|
|
</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 %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'users/registrations/2fa_wizard' %>
|
2020-07-01 17:07:33 +08:00
|
|
|
<% end %>
|
2020-06-29 16:56:06 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-29 16:57:41 +08:00
|
|
|
|