From d0ba62e2e773dbd3cc89bf6f446da45370652360 Mon Sep 17 00:00:00 2001 From: "Pablo J. Urbano Santos" Date: Tue, 22 Nov 2011 20:29:33 +0100 Subject: [PATCH] Fixes #597. Add a visible error when user tries to delete an image without cheking the "I'm sure" checkbox. --- mediagoblin/user_pages/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index 25fd2ebb..2ccb453b 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -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)) -- 2.25.1