Index: openacs-4/packages/rules/www/add-rule.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/add-rule.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rules/www/add-rule.tcl 3 Dec 2004 17:56:02 -0000 1.1
+++ openacs-4/packages/rules/www/add-rule.tcl 8 Dec 2004 21:23:33 -0000 1.2
@@ -15,26 +15,27 @@
set context [list "Add rule"]
set assessments [rules::rule::get_assessments]
-form create add_rule
-element create add_rule rule_name \
- -datatype text\
- -widget text\
- -label "Rule Name"
-
-element create add_rule asm_id\
- -datatype text\
- -widget select\
- -label "Assessment Related"\
- -options $assessments
+ad_form -name add_rule -form {
+
+ { rule_name:text(text)
+ {label "Rule Name"}
+ }
+ {asm_id:text(select)
+ {label "Assessment Related"}
+ {options $assessments}
+ }
+ {active_p:text(select)
+ {label "Active"}
+ {options {{Yes y} { No n}}}
+ }
+} -on_submit {
+ set table_name "rules"
+ set id_column_name "rule_id"
+ set return_url "index"
+ set generated_id "rule_id"
-element create add_rule active_p\
- -datatype text\
- -widget select\
- -label "Active"\
- -options {{Yes y} { No n}}
+ rules::rule::new_rule -rule_name $rule_name -asm_id $asm_id -active_p $active_p
-if {[template::form is_valid add_rule]} {
- template::form get_values add_rule rule_name asm_id active_p
- rules::rule::new_rule -rule_name $rule_name -asm_id $asm_id -active_p $active_p
- ad_returnredirect "index"
+} -after_submit {
+ ad_returnredirect "index"
}
Index: openacs-4/packages/rules/www/admin/admin-master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/admin/Attic/admin-master.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rules/www/admin/admin-master.adp 3 Dec 2004 18:01:18 -0000 1.1
+++ openacs-4/packages/rules/www/admin/admin-master.adp 8 Dec 2004 21:23:33 -0000 1.2
@@ -23,7 +23,9 @@
@focus;noquote@
@context;noquote@
@context_bar;noquote@
- @doc_type;noquote@
+ @doc_type;noquote@
+ @title;noquote@