Add a proper confirmation message when we detach an used disk
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
This commit is contained in:
parent
ca4500e572
commit
06f3801499
@ -402,9 +402,16 @@ Ext.define('PVE.qemu.HardwareView', {
|
||||
disabled: true,
|
||||
dangerous: true,
|
||||
confirmMsg: function(rec) {
|
||||
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
|
||||
"'" + me.renderKey(rec.data.key, {}, rec) + "'");
|
||||
if (rec.data.key.match(/^unused\d+$/)) {
|
||||
var warn = gettext('Are you sure you want to remove entry {0}');
|
||||
if (this.text === this.altText) {
|
||||
warn = gettext('Are you sure you want to detach entry {0}');
|
||||
}
|
||||
|
||||
var entry = rec.data.key;
|
||||
var msg = Ext.String.format(warn, "'"
|
||||
+ me.renderKey(entry, {}, rec) + "'");
|
||||
|
||||
if (entry.match(/^unused\d+$/)) {
|
||||
msg += " " + gettext('This will permanently erase all data.');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user