mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Add enable 2fa button to user settings
This commit is contained in:
parent
a437e09085
commit
6fa97d3639
4 changed files with 19 additions and 1 deletions
|
@ -79,4 +79,8 @@
|
|||
}
|
||||
$fileInput[0].value = '';
|
||||
});
|
||||
|
||||
$('#twoFactorAuthentication').click(function() {
|
||||
$('#twoFactorAuthenticationModal').modal('show');
|
||||
});
|
||||
}());
|
||||
|
|
12
app/views/users/registrations/_2fa_modal.html.erb
Normal file
12
app/views/users/registrations/_2fa_modal.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<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"></h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -142,7 +142,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<button class="btn btn-primary" id="twoFactorAuthentication"><%= t("users.registrations.edit.2fa_button") %></button>
|
||||
</div>
|
||||
<div class="col-md-7 col-md-offset-1">
|
||||
<div class="row user-statistics">
|
||||
|
@ -176,6 +176,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render partial: '2fa_modal' %>
|
||||
<%= render partial: 'users/shared/user_avatars_modal' %>
|
||||
|
||||
<%= javascript_pack_tag 'custom/croppie' %>
|
||||
|
|
|
@ -1593,6 +1593,7 @@ en:
|
|||
password_title: "Change password"
|
||||
new_password_label: "New password"
|
||||
new_password_2_label: "New password confirmation"
|
||||
2fa_button: "Enable two-factor authentication"
|
||||
new:
|
||||
head_title: "Sign up"
|
||||
team_name_label: "Team name"
|
||||
|
|
Loading…
Reference in a new issue