aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/forms.py
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2011-08-30 23:16:46 +0200
committerJoar Wandborg <git@wandborg.com>2011-08-30 23:16:46 +0200
commit502073f2bf65380be18b349a678ac075777889a4 (patch)
tree9472a0644926b2df8316d1f92fee53ebe58ae15c /mediagoblin/user_pages/forms.py
parent7d0efbae2955cf58eed86daa30cd3507c9088269 (diff)
downloadmediagoblin-502073f2bf65380be18b349a678ac075777889a4.tar.lz
mediagoblin-502073f2bf65380be18b349a678ac075777889a4.tar.xz
mediagoblin-502073f2bf65380be18b349a678ac075777889a4.zip
Feature #403 - Ability to delete media entries - Fixes according to feedback
* Moved `mediagoblin.confirm` stuff to `mediagoblin.user_pages`, templates too. * Removed route extension for `mediagoblin.confirm` * Created `delete_media_files` which deletes all media files on the public_store when the entry is deleted * Created a new decorator to check if a user has the permission to delete an entry.
Diffstat (limited to 'mediagoblin/user_pages/forms.py')
-rw-r--r--mediagoblin/user_pages/forms.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/mediagoblin/user_pages/forms.py b/mediagoblin/user_pages/forms.py
index 25001019..4a79bedd 100644
--- a/mediagoblin/user_pages/forms.py
+++ b/mediagoblin/user_pages/forms.py
@@ -23,3 +23,10 @@ class MediaCommentForm(wtforms.Form):
comment_content = wtforms.TextAreaField(
_('Comment'),
[wtforms.validators.Required()])
+
+
+class ConfirmDeleteForm(wtforms.Form):
+ confirm = wtforms.RadioField('Confirm',
+ default='False',
+ choices=[('False', 'No, I made a mistake!'),
+ ('True', 'Yes, delete it!')])