Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v diff -u -N -r1.53 -r1.54 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 7 Sep 2015 16:09:16 -0000 1.53 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 7 Aug 2017 23:48:02 -0000 1.54 @@ -1,15 +1,19 @@ -# Form widgets for the ArsDigita Templating System +ad_library { + Form widgets for the ArsDigita Templating System -# Copyright (C) 1999-2000 ArsDigita Corporation -# Authors: Karl Goldstein (karlg@arsdigita.com) -# Stanislav Freidin (sfreidin@arsdigita.com) + @author Karl Goldstein (karlg@arsdigita.com) + @author Stanislav Freidin (sfreidin@arsdigita.com) -# $Id$ + @cvs-id $Id$ +} +# Copyright (C) 1999-2000 ArsDigita Corporation + # This is free software distributed under the terms of the GNU Public # License. Full text of the license is available from the GNU Project: # http://www.fsf.org/copyleft/gpl.html + namespace eval template {} namespace eval template::widget {} namespace eval template::data {} @@ -322,7 +326,7 @@ if { $mode ne "edit" } { set output {} if { $value ne "" } { - append output "[ad_quotehtml $value]" + append output "[ns_quotehtml $value]" } } else { set output "" + append output ">[ns_quotehtml $value]" } return $output @@ -381,42 +385,42 @@ if { ( $type eq "checkbox" || $type eq "radio" ) && [info exists element(value)] } { # This can be used in the form template in a tag. set attributes(id) "$element(form_id):elements:$element(name):$element(value)" - } elseif { $type eq "password" || $type eq "text" || $type eq "button" || $type eq "file"} { + } elseif { $type in {"password" "text" "button" "file" }} { set attributes(id) "$element(name)" } - # Handle display mode of visible normal form elements, i.e. not hidden, not submit, not button, not clear if { $element(mode) ne "edit" && $type ni { hidden submit button clear checkbox radio } } { set output "" if { [info exists element(value)] } { - append output [ad_quotehtml $element(value)] - append output "" + append output [ns_quotehtml $element(value)] + append output [subst {}] } } else { - set output "" + } return $output @@ -505,12 +509,12 @@ # I changed this by saying that field is multiple whenever element(values) # exists and is not null. if { [info exists element(values)] && $element(values) ne "" } { - ns_log notice "hidden form element with multiple values: <$element(values)>" + #ns_log notice "hidden form element with multiple values: <$element(values)>" set output {} set count 0 foreach itemvalue $element(values) { append output [subst { - + }] incr count } @@ -661,7 +665,7 @@ if { [info exists values($value)] } { lappend selected_list $label - append output "" + append output [subst {}] } } @@ -678,37 +682,37 @@ set label [lindex $option 0] set value [lindex $option 1] - append output " $label
\n" + append output [subst {>[ns_quotehtml $label]
\n}] } } default { - append output "" } @@ -1074,8 +1078,8 @@ append output [template::util::select_text::get_property select_value $element(value)] append output " " append output [template::util::select_text::get_property text_value $element(value)] - append output "" - append output "" + append output "" + append output "" } } @@ -1295,13 +1299,13 @@ set output {} # edit mode - set checkbox_text "