Index: openacs-4/contrib/packages/survey/www/admin/section-template-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-template-ae.tcl,v diff -u -N -r1.2 -r1.2.2.1 --- openacs-4/contrib/packages/survey/www/admin/section-template-ae.tcl 15 Feb 2004 13:56:12 -0000 1.2 +++ openacs-4/contrib/packages/survey/www/admin/section-template-ae.tcl 16 Mar 2004 12:04:51 -0000 1.2.2.1 @@ -62,13 +62,13 @@ {apply:text(submit) {label "[_ survey.Apply]"} {value "apply"}} {revert:text(submit) {label "[_ survey.lt_Erase_custom_template]"} {value "erase"}} } -on_submit { - if {$apply=="apply"} { + if {[exists_and_not_null apply]} { # write edited template into a file set file_handle [open $template_filename w] puts $file_handle $template_source close $file_handle } - if {$revert=="erase"} { + if {[exists_and_not_null revert]} { # erase template file if {[file exists $template_filename]} { file delete $template_filename