From 242bb7ca54fa84bf3544c64bfb7166ff52fe9dc3 Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Wed, 25 Apr 2018 13:23:08 +0200 Subject: [PATCH] B #2024: Sunstone reloads the page with a group change of a user (#2026) (cherry picked from commit 426f4bc9cf4ae666841281d04cb99ef639109288) --- .../app/tabs/users-tab/panels/groups.js | 9 ++--- .../app/tabs/users-tab/panels/groups/html.hbs | 34 +++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/sunstone/public/app/tabs/users-tab/panels/groups.js b/src/sunstone/public/app/tabs/users-tab/panels/groups.js index 7460e1ffd6..e5b75c3f14 100644 --- a/src/sunstone/public/app/tabs/users-tab/panels/groups.js +++ b/src/sunstone/public/app/tabs/users-tab/panels/groups.js @@ -108,7 +108,7 @@ define(function(require) { this.groupsTableEdit.selectResourceTableSelect({ids: this.groups}); var that = this; - $("#cancel_update_group").hide(); + $("#cancel_update_group").hide(); var that = this; context.off("click", "#update_group"); context.on("click", "#update_group", function() { @@ -122,21 +122,21 @@ define(function(require) { }); $(".show_labels").hide(); $(".select_labels").show(); + $("#submit-group").show(); }); context.off("click", "#cancel_update_group"); context.on("click", "#cancel_update_group", function() { $(".select_labels").hide(); $(".show_labels").show(); - + $("#submit-group").hide(); }); - $('#Form_change_second_grp').submit(function() { var selectPrimaryGrp = $("#choose_primary_grp .resource_list_select").val(); var selectedGroupsList = that.groupsTableEdit.retrieveResourceTableSelect(); - if (selectPrimaryGrp != -1 && selectPrimaryGrp != that.element.GID) { + if (selectPrimaryGrp != -1 && selectPrimaryGrp != that.element.GID) { Sunstone.runAction("User.chgrp", [that.element.ID], selectPrimaryGrp); } @@ -158,6 +158,7 @@ define(function(require) { Sunstone.runAction('User.refresh'); }, 1500); + return false; }); return false; } diff --git a/src/sunstone/public/app/tabs/users-tab/panels/groups/html.hbs b/src/sunstone/public/app/tabs/users-tab/panels/groups/html.hbs index 1a51f5141b..7df63a0aed 100644 --- a/src/sunstone/public/app/tabs/users-tab/panels/groups/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/panels/groups/html.hbs @@ -13,16 +13,16 @@ {{! See the License for the specific language governing permissions and }} {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -
- - -
-
+
+ + +
+
{{tr "Primary Group"}} @@ -31,7 +31,7 @@
-
+
{{tr "Secondary Group"}}
@@ -46,9 +46,9 @@
-
- -
-
\ No newline at end of file + + \ No newline at end of file