From 673adde9f1fd11962005439ba018f4cf60d6f404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Mon, 7 Jan 2019 14:48:10 +0100 Subject: [PATCH] Make the admin retype the user name before deleting --- src/static/admin.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/static/admin.html b/src/static/admin.html index 1af6ca5..35b0de5 100644 --- a/src/static/admin.html +++ b/src/static/admin.html @@ -66,8 +66,13 @@ row.find(".tmp-icon").attr("src", identicon(user.Email)) row.find(".tmp-del").on("click", function (e) { - if (confirm("Delete User '" + user.Name + "'?")) { - deleteUser(user.Id); + var name = prompt("To delete user '" + user.Name + "', please type the name below") + if (name) { + if (name == user.Name) { + deleteUser(user.Id); + } else { + alert("Wrong name, please try again") + } } return false; });