From 45716d15c1aef18fa036eec7bd8678de5fd65081 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ Date: Sun, 21 Dec 2014 00:04:23 +0100 Subject: [PATCH] Display confirmation page before to delete all votes of one poll. --- adminstuds.php | 7 +++++++ tpl/confirm/delete_votes.tpl | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tpl/confirm/delete_votes.tpl diff --git a/adminstuds.php b/adminstuds.php index 0aad6ed..0fbbef1 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -128,6 +128,13 @@ if (!empty($_POST['delete_comment'])) { // Remove all votes // ------------------------------- if (isset($_POST['remove_all_votes'])) { + $smarty->assign('poll_id', $poll_id); + $smarty->assign('admin_poll_id', $admin_poll_id); + $smarty->assign('title', _('Poll') . ' - ' . $poll->title); + $smarty->display('confirm/delete_votes.tpl'); + exit; +} +if (isset($_POST['confirm_remove_all_votes'])) { $adminPollService->cleanVotes($poll_id); } diff --git a/tpl/confirm/delete_votes.tpl b/tpl/confirm/delete_votes.tpl new file mode 100644 index 0000000..28490b0 --- /dev/null +++ b/tpl/confirm/delete_votes.tpl @@ -0,0 +1,11 @@ +{extends file='page.tpl'} + +{block name=main} +
+
+

{_("Confirm removal of all votes of the poll")}

+

+

+
+
+{/block} \ No newline at end of file