diff options
-rw-r--r-- | src/http/tpl/posts-manage.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/http/tpl/posts-manage.html b/src/http/tpl/posts-manage.html index ac781df..96b30ca 100644 --- a/src/http/tpl/posts-manage.html +++ b/src/http/tpl/posts-manage.html @@ -1,4 +1,10 @@ {{ define "body" }} + <script> + function confirmDelete(event) { + if (!confirm("Are you sure you want to delete this post?")) + event.preventDefault(); + } + </script> <p> <a href="{{ BlogURL "admin" }}">Back to Admin</a> @@ -34,7 +40,11 @@ action="{{ PostURL .ID }}?method=delete" method="POST" > - <input type="submit" value="Delete" /> + <input + type="submit" + value="Delete" + onclick="confirmDelete(event)" + /> </form> </td> </tr> |