From: Michael Tremer Date: Fri, 15 Dec 2023 13:12:14 +0000 (+0000) Subject: docs: Fix deleting files X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08e086b645512dc79fb30a7b0363c3a652d3477a;p=ipfire.org.git docs: Fix deleting files Signed-off-by: Michael Tremer --- diff --git a/src/templates/docs/confirm-delete.html b/src/templates/docs/confirm-delete.html index 042a61f4..cf6115ed 100644 --- a/src/templates/docs/confirm-delete.html +++ b/src/templates/docs/confirm-delete.html @@ -2,26 +2,37 @@ {% block title %}{{ _("Delete %s") % file.filename }}{% end block %} -{% block content %} -
-
-
-
{{ _("Delete %s") % file.filename }}
+{% block container %} +
+
+
+
+

+ {{ _("Delete File") }} +

+

{{ file.filename }}

-

- {{ _("Do you really want to delete %(filename)s in %(path)s?") % { "filename" : file.filename, "path" : file.path } }} -

+
+
+ {% raw xsrf_form_html() %} - - {% raw xsrf_form_html() %} +
+

+ {{ _("Do you really want to delete %(filename)s in %(path)s?") % { "filename" : file.filename, "path" : file.path } }} +

+
-
- +
+
+ +
+
+
- +
-
+
{% end block %} diff --git a/src/web/docs.py b/src/web/docs.py index e0ee6733..984b1f7c 100644 --- a/src/web/docs.py +++ b/src/web/docs.py @@ -340,7 +340,7 @@ class DeleteFileHandler(base.BaseHandler): with self.db.transaction(): file.delete(self.current_user) - self.redirect("%s/_files" % file.path) + self.redirect("/docs%s/_files" % file.path) class SearchHandler(base.BaseHandler):