diff --git a/javascript/GridFieldBulkManager.js b/javascript/GridFieldBulkManager.js index 1aee0d9..95e9a51 100644 --- a/javascript/GridFieldBulkManager.js +++ b/javascript/GridFieldBulkManager.js @@ -126,6 +126,11 @@ }); data.records = ids; + if(!confirm(ss.i18n.sprintf(ss.i18n._t('GridFieldBulkTools.ACTION_CONFIRM', 'Are you sure you want to %s %s items?'), action, ids.length))) { + e.preventDefault(); + return false; + } + if ( url.indexOf('?') !== -1 ) cacheBuster = '&cacheBuster=' + cacheBuster; else cacheBuster = '?cacheBuster=' + cacheBuster; diff --git a/javascript/lang/en_US.js b/javascript/lang/en_US.js index 1dbb9e9..6057630 100644 --- a/javascript/lang/en_US.js +++ b/javascript/lang/en_US.js @@ -4,6 +4,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { ss.i18n.addDictionary('en_US', { 'GridFieldBulkTools.FINISH_CONFIRM': "You have unsaved changes. Continuing will loose all unsaved data.\n\nDo your really want to continue?", 'GridFieldBulkTools.EDIT_CHANGED': 'Modified', - 'GridFieldBulkTools.EDIT_UPDATED': 'Saved' + 'GridFieldBulkTools.EDIT_UPDATED': 'Saved', + 'GridFieldBulkTools.ACTION_CONFIRM': 'Are you sure you want to %s %s items?' }); }