diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index ab7a1e4c6..96eed79ba 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -191,7 +191,9 @@ .on('inlineEditing:fieldUpdated', '.inline-editing-container', function() { var newName = $(this).find('.view-mode').html(); $('.breadcrumb-teams .active').html(newName); - $('#team-switch .selected-team').html(newName); + if ($('.settings-team-name').data('current-team')) { + $('#team-switch .selected-team').html(newName); + } }); } diff --git a/app/controllers/users/settings/teams_controller.rb b/app/controllers/users/settings/teams_controller.rb index 2218a00a7..fc46e4906 100644 --- a/app/controllers/users/settings/teams_controller.rb +++ b/app/controllers/users/settings/teams_controller.rb @@ -64,7 +64,7 @@ module Users ) # Redirect to new team page - redirect_to action: :show, id: @new_team.id + redirect_to team_path(@new_team) else render :new end diff --git a/app/views/users/settings/teams/show.html.erb b/app/views/users/settings/teams/show.html.erb index 1c87a6492..6323568d7 100644 --- a/app/views/users/settings/teams/show.html.erb +++ b/app/views/users/settings/teams/show.html.erb @@ -15,7 +15,7 @@ <%= render partial: "users/settings/teams/breadcrumbs.html.erb" %> -