Skip to content
Snippets Groups Projects
Commit c992482e authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Prevent duplicate group showing in multiselect that added the group

parent a4614f83
No related branches found
No related tags found
No related merge requests found
......@@ -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({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment