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

28 lines
1.4 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>
<%= 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>
<%= 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 %>
<%= 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