mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-22 15:15:53 +00:00
remove button: allow to set custom confirmation message
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
2834a05d2b
commit
26e2aa7ce4
@ -110,6 +110,7 @@ Ext.define('Proxmox.button.StdRemoveButton', {
|
||||
|
||||
config: {
|
||||
baseurl: undefined,
|
||||
customConfirmationMessage: undefined,
|
||||
},
|
||||
|
||||
getUrl: function(rec) {
|
||||
@ -133,7 +134,14 @@ Ext.define('Proxmox.button.StdRemoveButton', {
|
||||
let me = this;
|
||||
|
||||
let name = me.getRecordName(rec);
|
||||
return Ext.String.format(gettext('Are you sure you want to remove entry {0}'), `'${name}'`);
|
||||
|
||||
let text;
|
||||
if (me.customConfirmationMessage) {
|
||||
text = me.customConfirmationMessage;
|
||||
} else {
|
||||
text = gettext('Are you sure you want to remove entry {0}');
|
||||
}
|
||||
return Ext.String.format(text, `'${name}'`);
|
||||
},
|
||||
|
||||
handler: function(btn, event, rec) {
|
||||
|
Loading…
Reference in New Issue
Block a user