[pve-devel] [PATCH manager 5/5 v2] dc options: Allow both package_update options
Dominic Jäger
d.jaeger at proxmox.com
Wed Jul 14 12:09:33 CEST 2021
When opened for the first time (undefined value in datacenter.cfg) we should
allow setting both options yes and no for the package_update checkbox.
Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
v2: new
www/manager6/dc/OptionView.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index ec6ff1a3..de7cbce9 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -35,6 +35,17 @@ Ext.define('PVE.dc.OptionView', {
Ext.Array.each(this.query('inputpanel'), function(panel) {
panel.setValues(edit_value);
+
+ if (name === 'notify') {
+ // Default depends on subscription status.
+ // Therefore, when datacenter.cfg contains nothing
+ // about package updates then allow setting both yes
+ // and no for it.
+ if (!edit_value || typeof edit_value.package_updates === 'undefined') {
+ const field = panel.down('field[name=package_updates]');
+ field.isDirty = () => true;
+ }
+ }
});
},
url: opts.url,
--
2.30.2
More information about the pve-devel
mailing list