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.192 -r1.193 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 23 May 2011 10:38:06 -0000 1.192 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 23 May 2011 11:48:45 -0000 1.193 @@ -429,9 +429,22 @@ ::xo::Page requireJS "YAHOO.xo_form_field_validate.add('[my id]','$package_url');" } - ::html::input [my get_attributes type size maxlength id name value disabled {CSSclass class} \ - autocomplete autofocus formnovalidate multiple pattern placeholder readonly required] {} - + set pairs [list [list CSSclass class]] + # Special handling of HTML boolean attributes, since they require a + # different coding; it would be nice, if tdom would care for this. + set booleanAtts [list required readonly disabled multiple formnovalidate autofocus] + foreach att $booleanAtts { + if {[my exists $att] && [my set $att]} { + my set __#$att $att + lappend pairs [list __#$att $att] + } + } + ::html::input [eval my get_attributes type size maxlength id name value \ + pattern placeholder $pairs] {} + foreach att $booleanAtts { + if {[my exists __#$att]} {my unset __#$att} + } + # # Disabled fieds are not returned by the browsers. For some # fields, we require to be sent. therefore we include in these