[pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry

Dominik Csapak d.csapak at proxmox.com
Thu Apr 25 11:32:34 CEST 2024


since tha api does not expect a 'delete' parameter here

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/window/AuthEditLDAP.js | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/window/AuthEditLDAP.js b/src/window/AuthEditLDAP.js
index f6f7fe0..388fc02 100644
--- a/src/window/AuthEditLDAP.js
+++ b/src/window/AuthEditLDAP.js
@@ -36,7 +36,7 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
 	    values.type = this.type;
 	}
 
-	if (values.anonymous_search) {
+	if (values.anonymous_search && !this.isCreate) {
 	    if (!values.delete) {
 		values.delete = [];
 	    }
@@ -166,7 +166,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
 	    maxValue: 65535,
 	    emptyText: gettext('Default'),
 	    submitEmptyText: false,
-	    deleteEmpty: true,
+	    cbind: {
+		deleteEmpty: '{!isCreate}',
+	    },
 	},
 	{
 	    xtype: 'proxmoxKVComboBox',
@@ -369,7 +371,9 @@ Ext.define('Proxmox.panel.LDAPSyncInputPanel', {
 	    xtype: 'proxmoxtextfield',
 	    name: 'user-classes',
 	    fieldLabel: gettext('User classes'),
-	    deleteEmpty: true,
+	    cbind: {
+		deleteEmpty: '{!isCreate}',
+	    },
 	    emptyText: 'inetorgperson, posixaccount, person, user',
 	    autoEl: {
 		tag: 'div',
@@ -380,7 +384,9 @@ Ext.define('Proxmox.panel.LDAPSyncInputPanel', {
 	    xtype: 'proxmoxtextfield',
 	    name: 'filter',
 	    fieldLabel: gettext('User Filter'),
-	    deleteEmpty: true,
+	    cbind: {
+		deleteEmpty: '{!isCreate}',
+	    },
 	},
     ],
 
-- 
2.39.2





More information about the pbs-devel mailing list