diff --git a/lib/IHP/static/helpers.js b/lib/IHP/static/helpers.js index 1b78d4b11..aca099575 100644 --- a/lib/IHP/static/helpers.js +++ b/lib/IHP/static/helpers.js @@ -49,7 +49,8 @@ function initDelete() { event.preventDefault(); if (!event.target.classList.contains('js-delete-no-confirm')) { - if (!confirm('Are you sure you want to delete this?')) { + var confirmText = event.target.dataset.confirm || 'Are you sure you want to delete this?'; + if (!confirm(confirmText)) { return; } } @@ -371,4 +372,4 @@ if (!('allIntervals' in window)) { var oldLength = window.allTimeouts.length; window.allTimeouts = new Array(oldLength); }; -} \ No newline at end of file +}