Add enable 2fa button to user settings

This commit is contained in:
aignatov-bio 2020-06-29 10:56:06 +02:00
parent a437e09085
commit 6fa97d3639
4 changed files with 19 additions and 1 deletions

View file

@ -79,4 +79,8 @@
}
$fileInput[0].value = '';
});
$('#twoFactorAuthentication').click(function() {
$('#twoFactorAuthenticationModal').modal('show');
});
}());

View 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">&times;</span></button>
<h2 class="modal-title"></h2>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>

View file

@ -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' %>

View file

@ -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"