From 212381a5c35be336fc403c7bfbde1f2d55cf005c Mon Sep 17 00:00:00 2001 From: Gavin Troy Date: Sat, 18 Feb 2023 21:01:59 +0000 Subject: [PATCH] Add delete confirmation --- static/custom.js | 5 +++++ static/index.html | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/static/custom.js b/static/custom.js index e81b39d..1d45571 100644 --- a/static/custom.js +++ b/static/custom.js @@ -58,6 +58,11 @@ $(document).ready(function() { $("#remove-btn").on("click", function(event) { event.preventDefault(); + $('#deletion-modal').modal('show'); + }); + + $("#deletion-confirm-btn").on("click", function(event) { + event.preventDefault(); $.ajax({ url: window.location.pathname, diff --git a/static/index.html b/static/index.html index faeb2cb..7236ddd 100644 --- a/static/index.html +++ b/static/index.html @@ -300,6 +300,28 @@ {{/if}} + {{#if is_created}} + + {{/if}} +