From: Michael Tremer Date: Thu, 30 May 2019 10:50:26 +0000 (+0100) Subject: wiki: Change URL type for edits X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40cb87a4ad9049d433640fdf1784d03951e2b754;p=ipfire.org.git wiki: Change URL type for edits Signed-off-by: Michael Tremer --- diff --git a/src/templates/wiki/404.html b/src/templates/wiki/404.html index 9fc12c04..bd3a4a53 100644 --- a/src/templates/wiki/404.html +++ b/src/templates/wiki/404.html @@ -15,7 +15,7 @@ {{ _("This wiki page does not exist, yet.") }}

- + {{ _("Create Now") }} diff --git a/src/templates/wiki/edit.html b/src/templates/wiki/edit.html index e96588b3..c5bec0ea 100644 --- a/src/templates/wiki/edit.html +++ b/src/templates/wiki/edit.html @@ -17,11 +17,9 @@ {% if page %}{{ _("Edit %s") % page.title }}{% else %}{{ _("Create A New Page") }}{% end %} -
+ {% raw xsrf_form_html() %} - -
diff --git a/src/templates/wiki/page.html b/src/templates/wiki/page.html index c6ba9e3f..e9f99acc 100644 --- a/src/templates/wiki/page.html +++ b/src/templates/wiki/page.html @@ -17,7 +17,7 @@
- + {{ _("Edit Page") }} {% if not current_user %}‐ {{ _("Yes, you can edit!") }}{% end %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 7535e686..233debfe 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -289,7 +289,7 @@ class Application(tornado.web.Application): authentication_handlers + [ # Actions - (r"/actions/edit([A-Za-z0-9\-_\/]+)", wiki.ActionEditHandler), + (r"([A-Za-z0-9\-_\/]+)?/_edit", wiki.ActionEditHandler), (r"/action/(watch|unwatch)(.*)", wiki.ActionWatchHandler), (r"/actions/upload", wiki.ActionUploadHandler),