all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 widget-toolkit] fix #4531: Fix ACME plugin edit form not detecting changes
Date: Wed, 30 Aug 2023 13:57:44 +0200	[thread overview]
Message-ID: <20230830115744.79622-1-f.schauer@proxmox.com> (raw)

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 by setting the originalValue directly without
calling checkDirty. The reason is that the dirty flag of the textfield
is set to true by setValue, and then not reset to false even though the
value matches the original value. This is fixed by calling checkDirty
after setting the originalValue to refresh the dirty flag.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
Changes since v1:
* Fix introduced bug that would set a dirty value as the original one
  when switching plugins.
* Improve the commit message

 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}`);
 		    }
-- 
2.39.2





             reply	other threads:[~2023-08-30 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 11:57 Filip Schauer [this message]
2023-08-30 14:05 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230830115744.79622-1-f.schauer@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal