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">×</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>
|
2021-07-05 22:50:37 +08:00
|
|
|
<%= form_with(url: main_app.users_2fa_disable_path, method: "post", class: "2fa-disable-form") 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") %>
|
2020-07-01 17:07:33 +08:00
|
|
|
<div class="sci-input-container password-field">
|
|
|
|
<%= 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 %>
|
2022-12-21 18:59:25 +08:00
|
|
|
<%= render partial: 'users/registrations/2fa_wizard.html.erb' %>
|
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
|
|
|
|