mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-05 22:56:29 +00:00

With introducing pmx-hint to pmg as well, by adding a 'pmx-hint' css-class to proxmox-widget-toolkit, it makes sense to use the definition everywhere. this patch drops the .pve-hint class from pve's css and replaces all occurences in the GUI-source. Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
Ext.define('PVE.qemu.BiosEdit', {
|
|
extend: 'Proxmox.window.Edit',
|
|
alias: 'widget.pveQemuBiosEdit',
|
|
onlineHelp: 'qm_bios_and_uefi',
|
|
|
|
initComponent : function() {
|
|
var me = this;
|
|
|
|
var EFIHint = Ext.createWidget({
|
|
xtype: 'displayfield', //submitValue is false, so we don't get submitted
|
|
userCls: 'pmx-hint',
|
|
value: gettext('You need to add an EFI disk for storing the EFI settings. See the online help for details.'),
|
|
hidden: true
|
|
});
|
|
|
|
Ext.applyIf(me, {
|
|
subject: 'BIOS',
|
|
items: [ {
|
|
xtype: 'pveQemuBiosSelector',
|
|
onlineHelp: 'qm_bios_and_uefi',
|
|
name: 'bios',
|
|
value: '__default__',
|
|
fieldLabel: 'BIOS',
|
|
listeners: {
|
|
'change' : function(field, newValue) {
|
|
if (newValue == 'ovmf') {
|
|
Proxmox.Utils.API2Request({
|
|
url : me.url,
|
|
method : 'GET',
|
|
failure : function(response, opts) {
|
|
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
|
},
|
|
success : function(response, opts) {
|
|
var vmConfig = response.result.data;
|
|
// there can be only one
|
|
if (!vmConfig.efidisk0) {
|
|
EFIHint.setVisible(true);
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
if (EFIHint.isVisible()) {
|
|
EFIHint.setVisible(false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
EFIHint
|
|
] });
|
|
|
|
me.callParent();
|
|
|
|
me.load();
|
|
|
|
}
|
|
});
|