[pve-devel] [PATCH widget-toolkit v2] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

Fiona Ebner f.ebner at proxmox.com
Thu Jan 4 13:41:05 CET 2024

Am 12.12.23 um 09:50 schrieb Lukas Wagner:
> In the GUI, when a sendmail/smtp target is edited and either
> 'Additional Recipients' or 'Recipients' is completely removed (only
> possible if the other field contains a value), parameter deletion did
> not work properly. After applying the changes, the old value would
> still be in place. The changes in this patch check if the field
> is empty and add an appropriate 'delete' to the PUT request.
> This error occurred because both fields were moved to a separate panel
> at some point (regular Panel instead of InputPanel, to avoid
> double-collection values on submit).
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
> Tested-by: Maximiliano Sandoval <m.sandoval at proxmox.com>

Worked for me too :)

However, I noticed that there were already cbinds for deleteEmpty for
the mailto/mailto-user fields and wondered why that didn't have an
effect. Turns out, it's because they're nested in another widget and
that requires an additional cbind.

Alternative patch with that approach sent here:

More information about the pve-devel mailing list