Index: openacs-4/contrib/packages/mailing-lists/www/madmin/lists.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/mailing-lists/www/madmin/lists.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/mailing-lists/www/madmin/lists.tcl 14 Feb 2004 07:40:35 -0000 1.2 +++ openacs-4/contrib/packages/mailing-lists/www/madmin/lists.tcl 24 Feb 2004 16:36:33 -0000 1.3 @@ -27,9 +27,7 @@ } if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} { - ad_form -extend -name mailing_list_form -form { - {category_ids:integer(category),multiple,optional {label "Categories"} {html {size 4}} {options {$_list_id $package_id}}} - } + category::ad_form::add_widgets -container_object_id $package_id -categorized_object_id $_list_id -form_name mailing_list_form } ad_form -extend -name mailing_list_form -form { @@ -83,6 +81,8 @@ {remind_body { [empty_string_p [mailing_list::util::check_valid_vars -text $remind_body -valid_vars [list user_id x link]]]} "In the reminder email you can only use the template variables @user_id@, @x@ and @link@."} +} -on_submit { + set category_ids [category::ad_form::get_categories -container_object_id $package_id] } -new_data { set list_id [mailing_list::add -name $name -locale $locale -teaser $teaser \ -sender_email $sender_email -welcome_subject $welcome_subject \ @@ -122,7 +122,3 @@ ad_return_template return - - {category_ids { - [category::categorized_in_all_trees_p $package_id $category_ids]} - "You have to select at least one category from each tree."}