Use a similar text than we do for the live-restore warning and make it
use the pmx-hint CSS class.
Note that the CSS class order is important here as ExtJS automatically
uses the last one in the list here to add a XYZ-default and XYZ-after
class, so if the hint one is the last in the string, then layout gets
broken.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data: {
coreCount: 1,
socketCount: 1,
+ liveImport: false,
warnings: [],
},
hideWarnings: get => get('warnings').length === 0,
warningsText: get => '<ul style="margin: 0; padding-left: 20px;">'
+ get('warnings').map(w => `<li>${w}</li>`).join('') + '</ul>',
+ liveImportNote: get => !get('liveImport') ? ''
+ : gettext('Note: If anything goes wrong during the live-import, new data written by the VM may be lost.'),
},
},
fieldLabel: gettext('Live Import'),
reference: 'liveimport',
isFormField: false,
- boxLabel: gettext('Experimental'),
+ boxLabelCls: 'pmx-hint black x-form-cb-label',
+ bind: {
+ value: '{liveImport}',
+ boxLabel: '{liveImportNote}',
+ },
},
{
xtype: 'displayfield',