From 310c0de06d4ed52c5ba75ae08ed9ba5cc9073fbf Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 12 Mar 2006 20:45:36 +0000 Subject: [PATCH] add cencel link to edit page --- ikiwiki | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ikiwiki b/ikiwiki index 7fae07eee..a6860f248 100755 --- a/ikiwiki +++ b/ikiwiki @@ -942,6 +942,10 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "content", type => "textarea", rows => 20, cols => 80); + if ($form->submitted eq "Cancel") { + print $q->redirect("$url/".htmlpage($page)); + return; + } if (! $form->submitted || ! $form->validate) { if ($form->field("do") eq "create") { if (exists $pagesources{lc($page)}) { @@ -989,7 +993,7 @@ sub cgi_editpage ($$) { #{{{ $form->tmpl_param("can_commit", $svn); $form->tmpl_param("indexlink", indexlink()); - print $form->render(submit => ["Save Page"]); + print $form->render(submit => ["Save Page", "Cancel"]); } else { # save page -- 2.26.2