]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/LDAPGroupSelector.js
mail-proxy-relaying: format function arguments
[pmg-gui.git] / js / LDAPGroupSelector.js
index 0fcb4fb689c39b0844450ab3e1f77ffe2156a238..0698567f4e970c1bfb3feb4ebf81f9d17af208b6 100644 (file)
@@ -3,18 +3,18 @@ Ext.define('PMG.LDAPGroupSelector', {
     alias: 'widget.pmgLDAPGroupSelector',
 
     profile: undefined,
-    
+
     queryMode: 'local',
 
     store: {
-       fields: [ 'dn' ],
+       fields: ['dn'],
        filterOnLoad: true,
        sorters: [
            {
-               property : 'dn',
-               direction: 'ASC'
-           }
-       ]
+               property: 'dn',
+               direction: 'ASC',
+           },
+       ],
     },
 
     valueField: 'dn',
@@ -25,7 +25,7 @@ Ext.define('PMG.LDAPGroupSelector', {
     setProfile: function(profile, force) {
        var me = this;
 
-       if (!force && (profile === undefined || (me.profile === profile))) {
+       if (!force && (profile === undefined || profile === null || me.profile === profile)) {
            return;
        }
 
@@ -35,20 +35,20 @@ Ext.define('PMG.LDAPGroupSelector', {
 
        me.store.setProxy({
            type: 'proxmox',
-           url: '/api2/json/config/ldap/' + me.profile + '/groups'
+           url: '/api2/json/config/ldap/' + me.profile + '/groups',
        });
 
        me.store.load();
     },
-    
+
     initComponent: function() {
        var me = this;
 
        me.callParent();
 
        if (me.profile !== undefined) {
-           me.setProfile(profile, true);
+           me.setProfile(me.profile, true);
        }
-    }
+    },
 });