diff --git a/lute/templates/book/tablelisting.html b/lute/templates/book/tablelisting.html
index c734c129..ab9a6a8e 100644
--- a/lute/templates/book/tablelisting.html
+++ b/lute/templates/book/tablelisting.html
@@ -88,6 +88,7 @@
// TODO zzfuture fix: security - add CSRF token
const ret = [];
const bkid = row[3];
+ const bktitle = encodeURIComponent(row[0]);
if (row[4] == 0) {
// not archived
ret.push(``);
@@ -96,8 +97,7 @@
else {
ret.push(``);
}
- ret.push(``);
-
+ ret.push(``);
return ret.join(' ');
}
},
@@ -156,8 +156,10 @@
document.location = `/book/edit/${bookid}`;
}
- function confirm_delete(bookid) {
- if (!confirm(`Deleting a book. Click OK to proceed, or Cancel.`)) {
+ function confirm_delete(el) {
+ const booktitle = decodeURIComponent($(el).data('bktitle'));
+ const bookid = $(el).data('bkid');
+ if (!confirm(`Deleting "${booktitle}". Click OK to proceed, or Cancel.`)) {
return;
}
do_action_post('delete', bookid);