]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/LDAPGroupEditor.js
hourly mail distribution chart: add dynamic color switching
[pmg-gui.git] / js / LDAPGroupEditor.js
index 4280a41c1cbfd302ba90b4197365acd7ab8c90e3..e8640dd4cae8c03dc7854bcb89f0ac5b9a633867 100644 (file)
@@ -13,7 +13,7 @@ Ext.define('PMG.LDAPGroupInputPanel', {
     },
 
     setValues: function(values) {
-       var me = this;
+       let me = this;
 
        if (values.profile !== undefined) {
            if (values.mode === 'any') {
@@ -24,7 +24,7 @@ Ext.define('PMG.LDAPGroupInputPanel', {
        }
 
        if (values.profile !== undefined) {
-           var groupField = this.lookupReference('groupField');
+           let groupField = this.lookupReference('groupField');
            groupField.setProfile(values.profile);
        }
 
@@ -36,28 +36,28 @@ Ext.define('PMG.LDAPGroupInputPanel', {
        xclass: 'Ext.app.ViewController',
 
        changeMode: function(f, value) {
-           var groupField = this.lookupReference('groupField');
+           let groupField = this.lookupReference('groupField');
            groupField.setDisabled(value !== 'group');
            groupField.setVisible(value === 'group');
-           var profileField = this.lookupReference('profileField');
-           var enabled = ((value != 'any') && (value != 'none'));
+           let profileField = this.lookupReference('profileField');
+           let enabled = (value !== 'any') && (value !== 'none');
            profileField.setDisabled(!enabled);
            profileField.setVisible(enabled);
        },
 
        changeProfile: function(f, value) {
-           var groupField = this.lookupReference('groupField');
+           let groupField = this.lookupReference('groupField');
            groupField.setProfile(value);
        },
 
        control: {
            'field[name=mode]': {
-               change: 'changeMode'
+               change: 'changeMode',
            },
            'field[name=profile]': {
-               change: 'changeProfile'
-           }
-       }
+               change: 'changeProfile',
+           },
+       },
     },
 
     items: [
@@ -66,36 +66,37 @@ Ext.define('PMG.LDAPGroupInputPanel', {
            name: 'mode',
            value: 'group',
            comboItems: [
-               [ 'group', gettext('Group member') ],
-               [ 'profile-any', gettext('Existing LDAP address')],
-               [ 'any', gettext('Existing LDAP address') +
-                 ', any profile' ],
-               [ 'profile-none', gettext('Unknown LDAP address')],
-               [ 'none', gettext('Unknown LDAP address') +
-                 ', any profile' ]
+               ['group', gettext('Group member')],
+               ['profile-any', gettext('Existing LDAP address')],
+               ['any', gettext('Existing LDAP address') +
+                 ', any profile'],
+               ['profile-none', gettext('Unknown LDAP address')],
+               ['none', gettext('Unknown LDAP address') +
+                 ', any profile'],
            ],
-           fieldLabel: gettext("Match")
+           fieldLabel: gettext("Match"),
        },
        {
            xtype: 'pmgLDAPProfileSelector',
            name: 'profile',
            reference: 'profileField',
-           fieldLabel: gettext("Profile")
+           fieldLabel: gettext("Profile"),
        },
        {
            xtype: 'pmgLDAPGroupSelector',
            name: 'group',
            reference: 'groupField',
-           fieldLabel: gettext("Group")
-       }
-    ]
+           fieldLabel: gettext("Group"),
+       },
+    ],
 });
 
 Ext.define('PMG.LDAPGroupEditor', {
     extend: 'Proxmox.window.Edit',
     alias: 'widget.pmgLDAPGroupEditor',
+    onlineHelp: 'pmgconfig_ldap',
 
     width: 500,
 
-    items: [{ xtype: 'pmgLDAPGroupInputPanel' }]
+    items: [{ xtype: 'pmgLDAPGroupInputPanel' }],
 });