diff --git a/web/skins/classic/views/js/groups.js b/web/skins/classic/views/js/groups.js index 23304c2319..a990ebd270 100644 --- a/web/skins/classic/views/js/groups.js +++ b/web/skins/classic/views/js/groups.js @@ -4,8 +4,7 @@ function newGroup() { .done(function(data) { insertModalHtml('groupdModal', data.html); $j('#groupModal').modal('show'); - $j('.chosen').chosen("destroy"); - $j('.chosen').chosen({width: "100%"}); + $j('#newGroupMonitorIds').chosen({width: "100%"}); }) .fail(logAjaxFail); } @@ -17,7 +16,7 @@ function setGroup( element ) { } function editGroup( element ) { - var gid = element.getAttribute('data-group-id'); + const gid = element.getAttribute('data-group-id'); if ( !gid ) { console.log('No group id found in editGroup'); } else { @@ -25,8 +24,7 @@ function editGroup( element ) { .done(function(data) { insertModalHtml('groupModal', data.html); $j('#groupModal').modal('show'); - $j('.chosen').chosen("destroy"); - $j('.chosen').chosen({width: "100%"}); + $j('#newGroupMonitorIds').chosen({width: "100%"}); }) .fail(logAjaxFail); }