diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-24 14:22:20 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-08 17:13:49 +0100 |
commit | cb2fbdd214ddda422fb7a57f5779ca450b6a0411 (patch) | |
tree | 532d501047d59e885195360a6229f67f65e9de1a /settings | |
parent | db9b2398dd50ccd46b20cacf2336669cf3eddde7 (diff) | |
download | nextcloud-server-cb2fbdd214ddda422fb7a57f5779ca450b6a0411.tar.gz nextcloud-server-cb2fbdd214ddda422fb7a57f5779ca450b6a0411.zip |
Fix group display name in the sidebar of the user management
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/groups.js | 14 | ||||
-rw-r--r-- | settings/templates/users/part.grouplist.php | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 522291a00d7..cfc0fa26e95 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -17,11 +17,11 @@ GroupList = { filter: '', filterGroups: false, - addGroup: function (gid, usercount) { + addGroup: function (gid, displayName, usercount) { var $li = $userGroupList.find('.isgroup:last-child').clone(); $li .data('gid', gid) - .find('.groupname').text(gid); + .find('.groupname').text(displayName); GroupList.setUserCount($li, usercount); $li.appendTo($userGroupList); @@ -128,22 +128,22 @@ GroupList = { } }, - createGroup: function (groupname) { + createGroup: function (groupid) { if (OC.PasswordConfirmation.requiresPasswordConfirmation()) { - OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.createGroup, this, groupname)); + OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.createGroup, this, groupid)); return; } $.post( OC.generateUrl('/settings/users/groups'), { - id: groupname + id: groupid }, function (result) { if (result.groupname) { var addedGroup = result.groupname; UserList.availableGroups = $.unique($.merge(UserList.availableGroups, [addedGroup])); - GroupList.addGroup(result.groupname); + GroupList.addGroup(groupid, result.groupname); } GroupList.toggleAddGroup(); }).fail(function(result) { @@ -173,7 +173,7 @@ GroupList = { GroupList.setUserCount(GroupList.getGroupLI(group.name).first(), group.usercount); } else { - var $li = GroupList.addGroup(group.name, group.usercount); + var $li = GroupList.addGroup(group.id, group.name, group.usercount); $li.addClass('appear transparent'); lis.push($li); diff --git a/settings/templates/users/part.grouplist.php b/settings/templates/users/part.grouplist.php index 469ed94adb3..4128a6b76e4 100644 --- a/settings/templates/users/part.grouplist.php +++ b/settings/templates/users/part.grouplist.php @@ -50,7 +50,7 @@ <!--List of Groups--> <?php foreach($_["groups"] as $group): ?> - <li data-gid="<?php p($group['name']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup"> + <li data-gid="<?php p($group['id']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup"> <a href="#" class="dorename"> <span class="groupname"><?php p($group['name']); ?></span> </a> |