diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-06-29 17:52:24 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-06-29 17:52:44 -0400 |
commit | c992482e9275af31ab697a9acbecc3ba59e9bf3c (patch) | |
tree | 262a39f25bd0a67df689aba5e726c97bf970eb70 /settings | |
parent | a4614f83ff6553f3e7b094e44ab2b0cf4ce68ff2 (diff) | |
download | nextcloud-server-c992482e9275af31ab697a9acbecc3ba59e9bf3c.tar.gz nextcloud-server-c992482e9275af31ab697a9acbecc3ba59e9bf3c.zip |
Prevent duplicate group showing in multiselect that added the group
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/js/users.js b/settings/js/users.js index 18f4e9f209c..90569bcc56b 100644 --- a/settings/js/users.js +++ b/settings/js/users.js @@ -42,7 +42,9 @@ $(document).ready(function(){ } var addGroup = function(group) { $('select[multiple]').each(function(index, element) { - $(element).append('<option value="'+group+'">'+group+'</option>'); + if ($(element).find('option[value="'+group +'"]').length == 0) { + $(element).append('<option value="'+group+'">'+group+'</option>'); + } }) }; element.multiSelect({ |