Merge pull request #2226 from aignatov-bio/ai-sci-4086-fix-team-name-after-update

Fix name update and path to team [SCI-4086]
This commit is contained in:
aignatov-bio 2019-11-25 13:55:09 +01:00 committed by GitHub
commit 993424d08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -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);
}
});
}

View file

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

View file

@ -15,7 +15,7 @@
<%= render partial: "users/settings/teams/breadcrumbs.html.erb" %>
<!-- TITLE -->
<div id="team-name" class="settings-team-name">
<div id="team-name" class="settings-team-name" data-current-team="<%= current_team == @team %>">
<% if can_update_team?(@team) %>
<%= render partial: "shared/inline_editing",
locals: {