mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-12 19:45:17 +00:00
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 <f.schauer@proxmox.com> [TL: record reason for originalValue handling & sligthly reword ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
575b4f3790
commit
a5736f02e5
@ -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}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user