This page describes a modification to Wiki to add a Cancel button to the web editing page. The patch is against Wikit version: 2003/08/20 19:06:22 68261-69214 '''Patch''' (web.tcl) ---- 239c239,243 < SavePage $N $C $host $name --- > cgi_import_as Action editAction > # Only actually save the page if the user selected "Save" > if {$editAction == "Save"} { > SavePage $N $C $host $name > } 351c355,358 < submit_button "= Save " --- > # Create Save and Cancel buttons > submit_button "Action=Save" > cgi_puts " [nbspace] " > submit_button "Action=Cancel" ---- '''26 Sep 2003''' [AKG] Extend the patch to allow the page to be renamed. As with the Tk interface, all references are automatically renamed. This patch superseeds the one above. ---- Index: web.tcl 238a239,244 > cgi_import_as Action editAction > # Only actually save the page if the user selected "Save" > if {$editAction == "Save" && ![catch {import T}]} { > set T1 [string trim $T] > if {$T1 != ""} { > set name $T1 239a246,247 > } > } 339c347 < cgi_puts [h2 [Wiki - $N]] --- > cgi_puts [h1 [Wiki - $N]] 347a356,357 > cgi_puts "Title: " > text T=$name style=width:70% 351c361,364 < submit_button "= Save " --- > # Create Save and Cancel buttons > submit_button "Action=Save" > cgi_puts " [nbspace] " > submit_button "Action=Cancel" 376c389 < cgi_puts [h2 "References to [Wiki - $N]"] --- > cgi_puts [h1 "References to [Wiki - $N]"] 419c432 < if {!$noTitle} { h2 $Title } --- > if {!$noTitle} { h1 $Title } 422c435 < isindex --- > isindex "prompt=Enter the search phrase. Append an asterix (*) to search page contents as well: " ---- [Category Wikit]