mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
39 lines
1.8 KiB
Text
39 lines
1.8 KiB
Text
<div class="modal" id="twoFactorAuthenticationModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
|
<h2 class="modal-title"><%= t("users.registrations.edit.2fa_modal.title") %></h2>
|
|
</div>
|
|
<% if current_user.two_factor_auth_enabled? %>
|
|
<%= form_with(url: users_2fa_disable_path, method: "post", class: "2fa-disable-form") do %>
|
|
<div class="modal-body">
|
|
<div class="sci-input-container password-field">
|
|
<%= label_tag :password, t("users.registrations.edit.2fa_modal.password_label") %>
|
|
<%= password_field_tag :password, '', class: "sci-input-field" %>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<%= button_tag t("users.registrations.edit.2fa_modal.submit_button"), type: 'submit', class: "btn btn-danger" %>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<%= form_with(url: users_2fa_enable_path, method: "post", class: "2fa-enable-form") do %>
|
|
<div class="modal-body">
|
|
<div class="qr-code"></div>
|
|
<div class="sci-input-container submit-code-field">
|
|
<%= label_tag :submit_code, t("users.registrations.edit.2fa_modal.submit_code_label") %>
|
|
<%= text_field_tag :submit_code, '', class: "sci-input-field" %>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<%= button_tag t("users.registrations.edit.2fa_modal.submit_button"), type: 'submit', class: "btn btn-primary" %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|