]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/LDAPConfig.js
spam detector: custom rules: move apply/revert buttons to pending section
[pmg-gui.git] / js / LDAPConfig.js
index 9fce9573c29fb3548e2faa93961dc79acb963c0b..0a114ff4f50080422f84369925904713230268f0 100644 (file)
@@ -1,10 +1,3 @@
-/*jslint confusion: true*/
-/* reload is function and string,
- * height is number and string,
- * hidden is bool and string,
- * bind is function and object,
- * callback is function and string
- */
 Ext.define('pmg-ldap-config', {
     extend: 'Ext.data.Model',
     fields: ['profile', 'server1', 'server2', 'comment',
@@ -35,6 +28,11 @@ Ext.define('PMG.LDAPInputPanel', {
        values.disable = values.enable ? 0 : 1;
        delete values.enable;
 
+       // do not send empty password
+       if (values.bindpw === '') {
+           delete values.bindpw;
+       }
+
        return values;
     },
 
@@ -110,6 +108,7 @@ Ext.define('PMG.LDAPInputPanel', {
                xtype: 'textfield',
                inputType: 'password',
                allowBlank: true,
+               emptyText: gettext('Unchanged'),
                name: 'bindpw',
                fieldLabel: gettext('Password'),
            },
@@ -487,9 +486,9 @@ Ext.define('PMG.LDAPConfigGrid', {
 
 
        reload: function() {
-           var me = this.getView();
-           me.getStore().load();
-           me.fireEvent('load', me);
+           let view = this.getView();
+           view.getStore().load();
+           view.fireEvent('load', view);
        },
 
        sync: function() {
@@ -519,7 +518,7 @@ Ext.define('PMG.LDAPConfigGrid', {
        model: 'pmg-ldap-config',
        sorters: [{
            property: 'profile',
-           order: 'DESC',
+           direction: 'ASC',
        }],
     },