Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
framadate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
framadate
Commits
3829402a
Commit
3829402a
authored
10 years ago
by
Olivier PEREZ
Browse files
Options
Downloads
Patches
Plain Diff
Display a confirmation page before delete the poll (confirmation does nothing for now)
parent
07d5a336
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
adminstuds.php
+15
-0
15 additions, 0 deletions
adminstuds.php
tpl/confirm/delete_poll.tpl
+11
-0
11 additions, 0 deletions
tpl/confirm/delete_poll.tpl
with
26 additions
and
0 deletions
adminstuds.php
+
15
−
0
View file @
3829402a
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
tpl/confirm/delete_poll.tpl
0 → 100644
+
11
−
0
View file @
3829402a
{
extends
file
=
'page.tpl'
}
{
block
name
=
main
}
<form
action=
"
{
$admin_poll_id
|
poll_url
:
true
}
"
method=
"POST"
>
<div
class=
"alert alert-danger text-center"
>
<h2>
{_("Confirm removal of your poll")}
</h2>
<p><button
class=
"btn btn-default"
type=
"submit"
name=
"cancel"
>
{_("Keep this poll")}
</button>
<button
type=
"submit"
name=
"confirm_delete_poll"
class=
"btn btn-danger"
>
{_("Remove this poll!")}
</button></p>
</div>
</form>
{/
block
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment