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.284.2.206 -r1.284.2.207 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 6 Mar 2022 18:00:00 -0000 1.284.2.206 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 9 Mar 2022 16:48:09 -0000 1.284.2.207 @@ -5988,7 +5988,7 @@ } #:msg "${:name} initialize date, format=${:format} components=${:components}" foreach c ${:components} {$c destroy} - :components [list] + :components {} foreach element [split ${:format}] { if {![info exists :format_map($element)]} { @@ -6050,10 +6050,12 @@ foreach c ${:components} { if {[$c istype ::xowiki::formfield::label]} continue if {$ticks ne ""} { - set value_part [clock format $ticks -format [$c set code]] + set value_part [string trim [clock format $ticks -format [$c set code]]] if {[$c set trim_zeros]} { set value_part [string trimleft $value_part 0] - if {$value_part eq ""} {set value_part 0} + if {$value_part eq ""} { + set value_part 0 + } } } else { set value_part "" @@ -6083,7 +6085,9 @@ if {![string is integer $year]} {set year 0} foreach v [list year month day hour min sec] { - if {[set $v] eq ""} {set $v [set :defaults($v)]} + if {[set $v] eq ""} { + set $v [set :defaults($v)] + } } #:msg "$year-$month-$day ${hour}:${min}:${sec}" if {[catch {set ticks [clock scan "$year-$month-$day ${hour}:${min}:${sec}"]}]} { @@ -6250,8 +6254,15 @@ Class create form -superclass richtext -parameter { {height 200} + {editor none} } -extend_slot_default validator form + form instproc initialize {} { + set :widget_type richtext + set ::__extra_allowed_tags form + set :__initialized 1 + } + form instproc check=form {value} { set form $value #:msg form=$form Index: openacs-4/packages/xowiki/tcl/test/xowiki-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/xowiki-test-procs.tcl,v diff -u -r1.1.2.73 -r1.1.2.74 --- openacs-4/packages/xowiki/tcl/test/xowiki-test-procs.tcl 5 Mar 2022 09:28:51 -0000 1.1.2.73 +++ openacs-4/packages/xowiki/tcl/test/xowiki-test-procs.tcl 9 Mar 2022 16:48:10 -0000 1.1.2.74 @@ -622,8 +622,8 @@ aa_equals "input_box3 box checked (box2: repeated box)" [$input_box3 hasAttribute checked] 0 aa_equals "input_box4 box checked (box2: repeated box)" [$input_box4 hasAttribute checked] 1 aa_equals "input_box5 box checked (mycompound)" [$input_box5 hasAttribute checked] 1 - aa_equals "input_box6 box checked (box3: simple disabled box)" [$input_box6 hasAttribute checked] 0 - aa_equals "input_box7 box checked (box3: simple disabled box)" [$input_box7 hasAttribute checked] 1 + aa_equals "input_box6 box checked (box3: simple disabled box)" [$input_box6 hasAttribute checked] 1 + aa_equals "input_box7 box checked (box3: simple disabled box)" [$input_box7 hasAttribute checked] 0 #ns_log notice "XXXX box3\n[$input_box6 asHTML] \n[$input_box7 asHTML]" } @@ -659,8 +659,8 @@ aa_equals "input_box3 box checked (box2: repeated box)" [$input_box3 hasAttribute checked] 0 aa_equals "input_box4 box checked (box2: repeated box)" [$input_box4 hasAttribute checked] 0 aa_equals "input_box5 box checked (mycompound)" [$input_box5 hasAttribute checked] 0 - aa_equals "input_box6 box checked (box3: simple disabled box)" [$input_box6 hasAttribute checked] 0 - aa_equals "input_box7 box checked (box3: simple disabled box)" [$input_box7 hasAttribute checked] 1 + aa_equals "input_box6 box checked (box3: simple disabled box)" [$input_box6 hasAttribute checked] 1 + aa_equals "input_box7 box checked (box3: simple disabled box)" [$input_box7 hasAttribute checked] 0 #ns_log notice "XXXX box3\n[$input_box6 asHTML] \n[$input_box7 asHTML]" }