From 3829402a693c49153f1677e6729a234015e28230 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ Date: Fri, 19 Dec 2014 00:47:56 +0100 Subject: [PATCH] Display a confirmation page before delete the poll (confirmation does nothing for now) --- adminstuds.php | 15 +++++++++++++++ tpl/confirm/delete_poll.tpl | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tpl/confirm/delete_poll.tpl diff --git a/adminstuds.php b/adminstuds.php index 689d51b..8435200 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -136,6 +136,21 @@ if (!empty($_POST['delete_comment'])) { } } + +// ------------------------------- +// Delete the entire poll +// ------------------------------- + +if (isset($_POST['delete_poll'])) { + $smarty->assign('poll_id', $poll_id); + $smarty->assign('admin_poll_id', $admin_poll_id); + $smarty->display('confirm/delete_poll.tpl'); + exit; +} +if (isset($_POST['confirm_delete_poll'])) { + // TODO +} + // Retrieve data $slots = $pollService->allSlotsByPollId($poll_id); $votes = $pollService->allUserVotesByPollId($poll_id); diff --git a/tpl/confirm/delete_poll.tpl b/tpl/confirm/delete_poll.tpl new file mode 100644 index 0000000..89e33bb --- /dev/null +++ b/tpl/confirm/delete_poll.tpl @@ -0,0 +1,11 @@ +{extends file='page.tpl'} + +{block name=main} +
+
+

{_("Confirm removal of your poll")}

+

+

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