followup: use true as inputValue

and normalize original value comparison, just to be sure.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-07-24 19:29:28 +02:00
parent e60959f99d
commit 4a99d7df53

View File

@ -2,6 +2,8 @@ Ext.define('Proxmox.form.PBSEncryptionCheckbox', {
extend: 'Ext.form.field.Checkbox',
xtype: 'pbsEncryptionCheckbox',
inputValue: true,
viewModel: {
data: {
value: null,
@ -44,7 +46,7 @@ Ext.define('Proxmox.form.PBSEncryptionCheckbox', {
if (!me.isCreate) {
if (val === null) {
return { 'delete': 'encryption-key' };
} else if (val && val !== me.originalValue) {
} else if (val && !!val !== !!me.originalValue) {
return { 'encryption-key': 'autogen' };
}
} else if (val) {