From a5736f02e5d729e57f772b2e411f6488e3cd466f Mon Sep 17 00:00:00 2001 From: Filip Schauer Date: Wed, 30 Aug 2023 13:57:44 +0200 Subject: [PATCH] fix #4531: acme plugins: correct change detection of dirty form fields Fix the ACME plugin edit form only detecting dirtychanges once the value of a textfield was dirtied and then changed back to the original. This behaviour is caused as we cannot reuse the field's resetOriginalValue method, due to that cause breakage here, e.g., if the value was edited, then another plugin (without a schema) gets selected, and then one would switch back again to the previous plugin, it would cause the (actually still dirty) value to get registered as new original one by mistake. So the fix here is to keep the manual originalValue tracking, but add the missing call to checkDirty after setting the originalValue to refresh the dirty flag. Fixes: 45708891 ("ui: add ACMEPluginEdit window") from pve-manager Signed-off-by: Filip Schauer [TL: record reason for originalValue handling & sligthly reword ] Signed-off-by: Thomas Lamprecht --- src/window/ACMEPluginEdit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/window/ACMEPluginEdit.js b/src/window/ACMEPluginEdit.js index 0f21527..66ef02c 100644 --- a/src/window/ACMEPluginEdit.js +++ b/src/window/ACMEPluginEdit.js @@ -127,6 +127,7 @@ Ext.define('Proxmox.window.ACMEPluginEdit', { if (me.createdFields[key]) { me.createdFields[key].setValue(value); me.createdFields[key].originalValue = me.originalValues[key]; + me.createdFields[key].checkDirty(); } else { extradata.push(`${key}=${value}`); }