| sort -u
)"
- if [ "$(POST cancel)" = cancel ]; then
- rm -- "$file"
- REDIRECT "$_BASE/"
+ if [ "$(POST delete)" = delete ]; then
+ if [ "$(POST delconfirm)" -o ! "$(DBM "$file" get participants)" ]; then
+ rm -- "$file"
+ REDIRECT "$_BASE/"
+ else
+ REDIRECT "$_BASE$PATH_INFO${month:+?month=}${month}#ERROR_NEEDCONFIRM"
+ fi
elif [ "$(POST post)" = post ]; then
REDIRECT "$_BASE${PATH_INFO%/*}"
elif [ "$(POST bookmark)" -a ! "$bookmarks" ]; then
[hidden "month" "$month"]
]
$([ "$splittimes" = "yes" ] && fs_splittimes || fs_timeofday )
- [submit "cancel" "cancel" Cancel]
- [submit "post" "post" Post Event]
+ $(if [ "$(DBM "$file" get participants)" ]; then
+ printf '[checkbox "delconfirm" "confirm" id="delconfirm"][label for=delconfirm Delete Poll]
+ [submit "delete" "delete" Delete Poll] [submit "post" "post" Poll page]'
+ else
+ printf '[submit "delete" "delete" Cancel] [submit "post" "post" Post Event]'
+ fi)
$(if [ "$bookmarks" ]; then
printf '[section .bookmark This admin page is accessible via the link [a href="%s" %s]. You must copy this link and keep it safe, so you can modify this poll later! The poll has also been bookmarked and will be listed on the front page.' \
"$(URL "//$(HEADER Host)/${_BASE}/${id}/${admin}")" \