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.248.2.37 -r1.248.2.38 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 20 Dec 2016 08:34:26 -0000 1.248.2.37 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 23 Dec 2016 14:33:02 -0000 1.248.2.38 @@ -2557,12 +2557,23 @@ foreach o [my options] { lassign $o label rep set atts [my get_attributes disabled {CSSclass class}] - if {[my exists forced_name]} {set name [my forced_name]} {set name [my name]} - lappend atts id [my id]:$rep name $name type radio value $rep - if {$value eq $rep} {lappend atts checked checked} + if {[my exists forced_name]} { + set name [my forced_name] + } { + set name [my name] + } + set id [my id]:$rep + lappend atts id $id name $name type radio value $rep + if {$value eq $rep} { + lappend atts checked checked + } ::html::input $atts {} - html::t "$label " - if {![my horizontal]} {html::br} + ::html::label -for $id { + html::t "$label " + } + if {![my horizontal]} { + html::br + } } } @@ -2593,16 +2604,17 @@ if {[my exists disabled]} {return $default} else {return ""} } checkbox instproc render_input {} { - # identical to radio, except "checkbox" type and lsearch; + # identical to radio, except "checkbox" type and "in" expression for value; # maybe we can push this up to enumeration.... set value [my value] foreach o [my options] { lassign $o label rep + set id [my id]:$rep set atts [my get_attributes disabled {CSSclass class}] - lappend atts id [my id]:$rep name [my name] type checkbox value $rep + lappend atts id $id name [my name] type checkbox value $rep if {$rep in $value} {lappend atts checked checked} ::html::input $atts {} - html::t "$label " + ::html::label -for $id {html::t "$label "} if {![my horizontal]} {html::br} } }