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.375 -r1.376
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 22 Nov 2009 22:54:21 -0000 1.375
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 23 Nov 2009 09:55:36 -0000 1.376
@@ -2039,6 +2039,13 @@
return $count
}
+ PageTemplate instproc css_class_name {{-margin_form:boolean true}} {
+ set name [expr {$margin_form ? "margin-form " : ""}]
+ set CSSname [my name]
+ regexp {^..:(.*)$} $CSSname _ CSSname
+ return [append name "Form-$CSSname"]
+ }
+
#
# PageInstance methods
#
@@ -2224,7 +2231,7 @@
set html ""; set mime ""
foreach {html mime} [my get_from_template text] break
set html [my adp_subst $html]
- return [my substitute_markup $html]
+ return "
[my substitute_markup $html]
"
}
PageInstance instproc template_vars {content} {
set result [list]
@@ -2782,7 +2789,8 @@
dom parse -simple -html $form doc
$doc documentElement root
set form_node [lindex [$root selectNodes //form] 0]
- Form add_dom_attribute_value $form_node class "margin-form"
+
+ Form add_dom_attribute_value $form_node class [$page_template css_class_name]
# The following two commands are for non-generated form contents
my set_form_data $form_fields
Form dom_disable_input_fields $root
@@ -2791,6 +2799,7 @@
}
}
+
FormPage instproc get_value {{-field_spec ""} {-cr_field_spec ""} before varname} {
#
# Read a property (instance attribute) and return
Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v
diff -u -r1.243 -r1.244
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 22 Nov 2009 22:56:56 -0000 1.243
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 23 Nov 2009 09:55:36 -0000 1.244
@@ -1494,8 +1494,9 @@
set url [export_vars -base [$package_id pretty_link -parent_id [my parent_id] [my name]] {{m "edit"} return_url}]
$form setAttribute action $url method POST
if {$has_file} {$form setAttribute enctype multipart/form-data}
- Form add_dom_attribute_value $form class "margin-form"
+ Form add_dom_attribute_value $form class [$page_template css_class_name]
}
+
my set_form_data $form_fields
if {$disable_input_fields} {
# (a) disable explicit input fields