From a61ce2d47887e883f03273778abd36fb3a818bd1 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 4 Jan 2023 12:11:55 +0100 Subject: [PATCH] dashboard_origins.html - implemented confirmation before deleting all origins --- app/templates/views/dashboard_origins.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/templates/views/dashboard_origins.html b/app/templates/views/dashboard_origins.html index bdc993b..be53086 100644 --- a/app/templates/views/dashboard_origins.html +++ b/app/templates/views/dashboard_origins.html @@ -13,7 +13,7 @@ - @@ -37,5 +37,12 @@ } load() + + function deleteOriginsWrapper() { + const response = confirm('Are you sure you want to delete all origins and their leases?'); + + if (response) + deleteOrigins().finally(() => load()) + } {% endblock %}