Skip to content
Snippets Groups Projects
Commit 39de6eb5 authored by Arie Peterson's avatar Arie Peterson
Browse files

Remember which tab we were on when saving kratos settings

parent 6f1f853c
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,8 @@ function flow_settings_validate() {
// cookie and regenerate a new flow
if (data.state == 'success') {
Cookies.set('flow_state', 'settings_saved');
var activeTab = $('#pills-tab .active').attr('id');
sessionStorage.setItem('settings_tab', activeTab);
// Redirect to generate new flow ID
window.location.href = 'settings';
......@@ -156,6 +158,8 @@ function flow_settings() {
// notification
if (state == 'settings_saved') {
$('#contentProfileSaved').show();
var activeTab = sessionStorage.getItem('settings_tab');
$('#' + activeTab).tab('show');
Cookies.set('flow_state', 'settings');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment