summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-12 20:45:36 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-12 20:45:36 +0000
commit310c0de06d4ed52c5ba75ae08ed9ba5cc9073fbf (patch)
tree747c4cd5b51f8b0778eccb7db30efa46053cb10b /ikiwiki
parentefb91c8d3c8c15cc534549aed085aff98860b8ab (diff)
add cencel link to edit page
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki6
1 files changed, 5 insertions, 1 deletions
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