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.139 -r1.140 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 27 Mar 2009 13:02:28 -0000 1.139 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 29 Mar 2009 14:19:19 -0000 1.140 @@ -383,10 +383,22 @@ } FormField instproc render_input {} { + # # This is the most general widget content renderer. # If no special renderer is defined, we fall back to this one, # which is in most cases a simple input fied of type string. + # ::html::input [my get_attributes type size maxlength id name value disabled {CSSclass class}] {} + # + # Disabled fieds are not returned by the browsers. For some + # fields, we require to be sent. therefore we include in these + # cases the value in an additional hidden field. Maybe we should + # change in the future the "name" of the disabled entry to keep + # some hypothetical html-checker quiet. + # + if {[my exists disabled] && [my exists transmit_field_always]} { + ::html::input [list type hidden name [my name] value [my set value]] {} + } my set __rendered 1 } 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.223 -r1.224 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 27 Mar 2009 13:02:28 -0000 1.223 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 29 Mar 2009 14:19:19 -0000 1.224 @@ -1187,14 +1187,14 @@ $f help_text "" } } - if {[$f name] eq "_name" || [$f name] eq "_nls_language"} { + if {[$f exists transmit_field_always] + && [lsearch [$f info mixin] ::xowiki::formfield::omit] > -1} { # Never omit these fields, this would cause problems with - # autonames and empty languages. Set these fields to hidden. - if {[lsearch [$f info mixin] ::xowiki::formfield::omit] > -1} { - $f remove_omit - $f class ::xowiki::formfield::hidden - $f initialize - } + # autonames and empty languages. Set these fields to hidden + # instead. + $f remove_omit + $f class ::xowiki::formfield::hidden + $f initialize #my msg "$f [$f name] [$f info class] [$f info mixin]" } } @@ -1375,6 +1375,9 @@ } } + $ff(_name) set transmit_field_always 1 + $ff(_nls_language) set transmit_field_always 1 + # some final sanity checks my form_fields_sanity_check $form_fields my post_process_form_fields $form_fields