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