mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Correct confirmation message when deleting files (#6975)
This commit is contained in:
parent
463ee0c5f7
commit
059137290f
@ -47,7 +47,13 @@
|
||||
|
||||
$('.AssetAdmin.cms-edit-form .action.gridfield-button-delete').entwine({
|
||||
onclick: function(e) {
|
||||
if(!confirm(ss.i18n._t('AssetAdmin.ConfirmDelete'))) return false;
|
||||
var msg;
|
||||
if(this.closest('.ss-gridfield-item').data('class') == 'Folder') {
|
||||
msg = ss.i18n._t('AssetAdmin.ConfirmDelete');
|
||||
} else {
|
||||
msg = ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE');
|
||||
}
|
||||
if(!confirm(msg)) return false;
|
||||
|
||||
this.getGridField().reload({data: [{name: this.attr('name'), value: this.val()}]});
|
||||
e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user