Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.83 -r1.84 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 28 Jul 2007 13:01:57 -0000 1.83 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 1 Aug 2007 15:14:52 -0000 1.84 @@ -58,12 +58,30 @@ # if there is no field spec, use the default from the slot definitions set __spec [expr {[my exists f.$__field] ? [my set f.$__field] : "="}] set __wspec [lindex $__spec 0] - #my msg "$__field wspec=$__wspec, spec=$__spec" - # - # get first the information from the attribute definitions & given specs - # - if {[lindex $__wspec 0] eq "="} { + + # check first if we have widget_specs. + # TODO: this part is likely to be removed in the future. + set s [$data get_rich_text_spec $__field ""] + if {$s ne ""} { + set __spec $s + set __wspec [lindex $__spec 0] + # old style folder spec substituion. ugly. + if {[my folderspec] ne ""} { + # append the folder spec to its options + set __newspec [list $__wspec] + foreach __e [lrange $__spec 1 end] { + foreach {__name __value} $__e break + if {$__name eq "options"} {eval lappend __value [my folderspec]} + lappend __newspec [list $__name $__value] + } + #my log "--F rewritten spec is '$__newspec'" + set __spec $__newspec + } + } elseif {[lindex $__wspec 0] eq "="} { + # + # get the information from the attribute definitions & given specs + # set f [$data create_form_field \ -name $__field \ -slot [$data find_slot $__field] \ @@ -88,7 +106,7 @@ set __spec [string map {\[ \\[ \] \\] \$ \\$ \\ \\\\} $__spec] } - #my log "--F field <$__field> = $__spec" + #my msg "--F field <$__field> = $__spec" append __fields [list $__spec] \n } Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.160 -r1.161 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Aug 2007 12:28:57 -0000 1.160 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Aug 2007 15:14:52 -0000 1.161 @@ -757,10 +757,11 @@ foreach {page_name var_name} [split $s ,] break # in case we have no name (edit new page) we use the first value or the default. set name [expr {[my exists name] ? [my set name] : $page_name}] - #ns_log notice "--w T.name = '$name' var=$page_name, $var_name $field_name " + #my msg "--w T.name = '$name' var=$page_name, $var_name $field_name " if {[string match $page_name $name] && [string match $var_name $field_name]} { set spec $widget_spec + #my msg "setting spec to $spec" break } }