[pve-devel] [PATCH manager 10/12] fix #4225: ui: form: isoselector: add optional required checkbox
Daniel Herzig
d.herzig at proxmox.com
Fri Oct 25 17:02:41 CEST 2024
Add a checkbox for marking an iso file as required.
This option is used in the backend to determine if the VM should start
up in case the configured ISO file is not available.
By default this box is not visible and disabled.
Signed-off-by: Daniel Herzig <d.herzig at proxmox.com>
---
www/manager6/form/IsoSelector.js | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/www/manager6/form/IsoSelector.js b/www/manager6/form/IsoSelector.js
index 66229e88..1803cd9d 100644
--- a/www/manager6/form/IsoSelector.js
+++ b/www/manager6/form/IsoSelector.js
@@ -15,12 +15,14 @@ Ext.define('PVE.form.IsoSelector', {
insideWizard: false,
labelWidth: undefined,
labelAlign: 'right',
+ showRequired: false,
cbindData: function() {
let me = this;
return {
nodename: me.nodename,
insideWizard: me.insideWizard,
+ showRequired: me.showRequired,
};
},
@@ -113,5 +115,25 @@ Ext.define('PVE.form.IsoSelector', {
},
},
},
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'required',
+ reference: 'requiredForBoot',
+ inputValue: true,
+ fieldLabel: gettext('Required'),
+ cbind: {
+ nodename: '{nodename}',
+ disabled: '{!showRequired}',
+ hidden: '{!showRequired}',
+ labelWidth: '{labelWidth}',
+ labelAlign: '{labelAlign}',
+ },
+ allowBlank: false,
+ listeners: {
+ change: function() {
+ this.up('pveIsoSelector').checkChange();
+ },
+ },
+ },
],
});
--
2.39.5
More information about the pve-devel
mailing list