Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.159 -r1.284.2.160 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 28 Jun 2021 15:33:21 -0000 1.284.2.159 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 28 Jun 2021 19:42:22 -0000 1.284.2.160 @@ -1302,7 +1302,7 @@ return $html } - FormField instproc reset_to_default args { + FormField instproc reset_on_validation_error args { # # We don't actually do anything here, but subclassess can overload it. # @@ -1688,13 +1688,13 @@ } } - CompoundField instproc reset_to_default args { + CompoundField instproc reset_on_validation_error args { # # We actually want to reset all the leaf components # - ns_log debug "reset_to_default COMPOUND" + ns_log debug "reset_on_validation_error COMPOUND" foreach f [:leaf_components] { - $f reset_to_default {*}$args + $f reset_on_validation_error {*}$args } } @@ -2086,15 +2086,15 @@ } - file instproc reset_to_default args { + file instproc reset_on_validation_error args { # - # Reset the value for form-fields of type "file" to avoid - # confusions in case of form validation error. A file-name might + # Reset the value for form-fields of type "file" to empty to avoid + # confusions in case of form validation errors. A file-name might # have been provided, but the file was not uploaded due to the # validation error. If we would not reset the value, the provided # name would cause an interpretation of an uploaded empty file. # - ns_log debug "reset_to_default [:serialize]" + #ns_log debug "reset_on_validation_error [:serialize]" set :value "" } Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.368.2.91 -r1.368.2.92 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 28 Jun 2021 15:31:15 -0000 1.368.2.91 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 28 Jun 2021 19:42:23 -0000 1.368.2.92 @@ -2791,10 +2791,12 @@ } else { :log validation_errors=$validation_errors # - # There were validation errors. Reset the value of form-fields. + # There were validation errors. Reset the value of form-fields + # which have to be reset on validation errors due to browser + # semantics. # foreach f $form_fields { - $f reset_to_default + $f reset_on_validation_error } }