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 -N -r1.284.2.58 -r1.284.2.59 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 29 Nov 2019 20:38:23 -0000 1.284.2.58 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 3 Dec 2019 17:26:37 -0000 1.284.2.59 @@ -3395,6 +3395,21 @@ } enumeration abstract instproc render_input {} + enumeration instproc value_if_nothing_is_returned_from_form {default} { + + # Here we have to distinguish between two cases: + # - edit mode: somebody has removed a mark from a check button; + # this means: clear the field + # - view mode: the fields were deactivated (made insensitive); + # this means: keep the old value -> return default + + if {[info exists :disabled]} { + return $default + } else { + return "" + } + } + enumeration instproc get_labels {values} { if {${:multiple}} { set labels [list] @@ -3629,21 +3644,6 @@ next } - checkbox instproc value_if_nothing_is_returned_from_form {default} { - - # Here we have to distinguish between two cases: - # - edit mode: somebody has removed a mark from a check button; - # this means: clear the field - # - view mode: the fields were deactivated (made insensitive); - # this means: keep the old value - - if {[info exists :disabled]} { - return $default - } else { - return "" - } - } - checkbox instproc render_input {} { set value [:value] @@ -4722,7 +4722,11 @@ {default t} } boolean instproc value_if_nothing_is_returned_from_form {default} { - if {[info exists :disabled]} {return $default} else {return f} + if {[info exists :disabled]} { + return $default + } else { + return f + } } boolean instproc initialize {} { # should be with cvs head message catalogs: