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.142 -r1.143 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Apr 2009 11:00:11 -0000 1.142 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 2 Apr 2009 12:12:23 -0000 1.143 @@ -1354,8 +1354,17 @@ my set widget_type text(checkbox) next } + + checkbox instproc value_if_nothing_is_returned_from_form {default} { - return "" + # Here we have to distinguish between two cases to: + # - edit mode: somebody has removed a mark from a check button; + # this means: clear the field + # - view mode: the fields were deactivted (made insensitive); + # this means: keep the old value + + #my msg "[my name] disabled=[my exists disabled]" + if {[my exists disabled]} {return $default} else {return ""} } checkbox instproc render_input {} { # identical to radio, except "checkbox" type and lsearch; @@ -2142,7 +2151,7 @@ {default t} } boolean instproc value_if_nothing_is_returned_from_form {default} { - return f + if {[my exists disabled]} {return $default} else {return f} } boolean instproc initialize {} { # should be with cvs head message catalogs: