From db31f8e842c5311da404e405dace421b8872a0d4 Mon Sep 17 00:00:00 2001 From: Burathar Date: Wed, 22 Jul 2020 21:00:24 +0200 Subject: [PATCH] Add confirmation before deleting game --- app/templates/game_owner_dashboard.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/templates/game_owner_dashboard.html b/app/templates/game_owner_dashboard.html index 87c3a34..4de0403 100644 --- a/app/templates/game_owner_dashboard.html +++ b/app/templates/game_owner_dashboard.html @@ -9,9 +9,7 @@ {% block app_content %}

{{ game.name }} Dashboard

- - - + {% if game.unreviewed_bunny_photos() %} @@ -118,5 +116,12 @@ addPlayerMarker(map, players[i]) } + //Delete Game button + function deleteGame() { + if (confirm("Are you sure you want to delete this game?")) { + window.location.href = "{{ url_for('main.delete_game', game_name=game.name) }}" + } + } + {% endblock %} \ No newline at end of file