summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-06-29 17:52:24 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-06-29 17:52:44 -0400
commitc992482e9275af31ab697a9acbecc3ba59e9bf3c (patch)
tree262a39f25bd0a67df689aba5e726c97bf970eb70 /settings
parenta4614f83ff6553f3e7b094e44ab2b0cf4ce68ff2 (diff)
downloadnextcloud-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.js4
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({