/* Popup a message window
- * where the user has to manually enter the ressource ID
+ * where the user has to manually enter the resource ID
* to enable the destroy button
*/
Ext.define('PVE.window.SafeDestroy', {
getParams: function() {
var me = this;
+ var purgeCheckbox = me.lookupReference('purgeCheckbox');
+ if (purgeCheckbox.checked) {
+ me.params.purge = 1;
+ }
if (Ext.Object.isEmpty(me.params)) {
return '';
}
labelWidth: 300,
hideTrigger: true,
allowBlank: false
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'purge',
+ reference: 'purgeCheckbox',
+ boxLabel: gettext('Purge'),
+ checked: false,
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext('Remove from replication and backup jobs')
+ }
}
]
}
} else if (item.type === 'CephPool') {
msg = Proxmox.Utils.format_task_description('cephdestroypool', item.id);
} else if (item.type === 'Image') {
- msg = Proxmox.Utils.format_task_description('imgdel', item.id);
+ msg = Proxmox.Utils.format_task_description('unknownimgdel', item.id);
} else {
throw "unknown item type specified";
}
messageCmp.setHtml(msg);
+ if (!(item.type === 'VM' || item.type === 'CT')) {
+ let purgeCheckbox = me.lookupReference('purgeCheckbox');
+ purgeCheckbox.setDisabled(true);
+ purgeCheckbox.setHidden(true);
+ }
+
var confirmField = me.lookupReference('confirmField');
msg = gettext('Please enter the ID to confirm') +
' (' + item.id + ')';