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 -r1.24 -r1.25
--- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 30 Sep 2003 19:27:49 -0000 1.24
+++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 5 Oct 2003 17:55:55 -0000 1.25
@@ -210,14 +210,12 @@
set output [textarea_internal $element(name) attributes $value $mode]
set spellcheck_properties [template::util::spellcheck::spellcheck_properties -element_ref element]
- set spellcheck_p [lindex $spellcheck_properties 0]
+ set spellcheck [lindex $spellcheck_properties 0]
- if { $spellcheck_p } {
- set yes_checked [lindex $spellcheck_properties 1]
- set no_checked [lindex $spellcheck_properties 2]
- append output "
Spellcheck?
- Yes \n
- No"
+ if { ![string equal ":nospell:" $spellcheck] } {
+ set selected_option [lindex $spellcheck_properties 1]
+ append output "
Spellcheck:
+[menu "$element(id).spellcheck" [nsv_get spellchecker lang_options] $selected_option {}]"
}
return $output
@@ -333,14 +331,12 @@
upvar $element_reference element
set spellcheck_properties [template::util::spellcheck::spellcheck_properties -element_ref element]
- set spellcheck_p [lindex $spellcheck_properties 0]
+ set spellcheck [lindex $spellcheck_properties 0]
- if { [string equal $element(mode) "edit"] && $spellcheck_p } {
- set yes_checked [lindex $spellcheck_properties 1]
- set no_checked [lindex $spellcheck_properties 2]
- return "[input text element $tag_attributes]
Spellcheck?
- Yes \n
- No"
+ if { [string equal $element(mode) "edit"] && ![string equal ":nospell:" $spellcheck] } {
+ set selected_option [lindex $spellcheck_properties 1]
+ return "[input text element $tag_attributes]
Spellcheck:
+[menu "$element(id).spellcheck" [nsv_get spellchecker lang_options] $selected_option {}]"
} else {
return [input text element $tag_attributes]
}