Fixes #597. Add a visible error when user tries to delete an image
authorPablo J. Urbano Santos <flamma@member.fsf.org>
Tue, 22 Nov 2011 19:29:33 +0000 (20:29 +0100)
committerPablo J. Urbano Santos <flamma@member.fsf.org>
Tue, 22 Nov 2011 19:29:33 +0000 (20:29 +0100)
without cheking the "I'm sure" checkbox.

mediagoblin/user_pages/views.py

index 25fd2ebb0f4ef4a4e6d1bf6aabb63a774af1ef65..2ccb453b9f90d66ba90ff3456cd7e4fb17a4001e 100644 (file)
@@ -179,6 +179,9 @@ def media_confirm_delete(request, media):
             return redirect(request, "mediagoblin.user_pages.user_home",
                 user=username)
         else:
+            messages.add_message(
+                request, messages.ERROR,
+                _("The file was not deleted because you didn't check that you were sure."))
             return exc.HTTPFound(
                 location=media.url_for_self(request.urlgen))