Index: openacs-4/packages/curriculum/lib/curriculum-ave.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/curriculum-ave.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/curriculum/lib/curriculum-ave.tcl 5 Sep 2003 09:32:14 -0000 1.8 +++ openacs-4/packages/curriculum/lib/curriculum-ave.tcl 22 Sep 2003 18:46:08 -0000 1.9 @@ -142,23 +142,21 @@ } ad_form -extend -name curriculum -form { - {description:richtext + {description:richtext,optional {mode $element_mode} {label "[_ curriculum.Description]"} {help_text $desc_help_text} {html {rows 10 cols 50 wrap soft}} - optional } } if { $write_p } { ad_form -extend -name curriculum -form { - {comment:richtext + {comment:richtext,optional {mode $element_mode} {label "[_ curriculum.Action_Log]"} {help_text "[_ curriculum.lt_This_field_is_for_com]"} {html {rows 5 cols 50 wrap soft}} - optional } } } @@ -198,13 +196,12 @@ # FIXME. Datatype "search" does not appear to work with ad_form very well. # Do we need an owner anyway when we're using workflow roles? ad_form -extend -name curriculum -form { - {owner_id:search + {owner_id:search,optional {mode $element_mode} {result_datatype integer} {label "[_ curriculum.Owner]"} {options $users_list} {search_query {[db_map user_search]}} - optional } } Index: openacs-4/packages/curriculum/lib/element-ave.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/element-ave.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/curriculum/lib/element-ave.tcl 15 Sep 2003 20:39:59 -0000 1.6 +++ openacs-4/packages/curriculum/lib/element-ave.tcl 22 Sep 2003 18:46:08 -0000 1.7 @@ -31,6 +31,10 @@ set form_mode edit set title "[_ curriculum.Add_Element]" + # Workaround for the default value of "url"; + # http://openacs.org/bugtracker/openacs/bug?bug%5fnumber=804 + set url $subsite_url + } else { #### @@ -41,7 +45,6 @@ # require permission on curriculum_id, not package_id basis. set write_p [permission::permission_p -object_id $curriculum_id -privilege write] - #permission::require_permission -object_id $curriculum_id -privilege write set form_mode display set curriculum_name [acs_object_name $curriculum_id] @@ -62,22 +65,20 @@ {label "[_ curriculum.Name]"} {html {size 50}} } - {description:richtext + {description:richtext,optional {label "[_ curriculum.Description]"} {help_text "[_ curriculum.lt_This_text_should_desc_1]"} {html {rows 10 cols 50 wrap soft}} - optional } - {url:text(text) + {url:text(text),optional {label "[_ curriculum.URL]"} {help_text "[_ curriculum.lt_A_leading_http_indica]"} {html {size 50}} - {value $subsite_url} } -} +} -on_request { + # Nothing, really +} -edit_request { -ad_form -extend -name element -edit_request { - curriculum::element::get -element_id $element_id -array element_array template::util::array_to_vars element_array @@ -98,11 +99,12 @@ } -new_data { curriculum::element::new \ + -element_id $element_id \ -curriculum_id $curriculum_id \ -name $name \ -description [template::util::richtext::get_property contents $description] \ -desc_format [template::util::richtext::get_property format $description] \ - -url $url \ + -url [ad_decode $url "" "[curriculum::conn package_url]element-ave?curriculum_id=$curriculum_id&element_id=$element_id" $url] \ -enabled_p t } -edit_data { @@ -112,7 +114,7 @@ -name $name \ -description [template::util::richtext::get_property contents $description] \ -desc_format [template::util::richtext::get_property format $description] \ - -url $url + -url [ad_decode $url "" "[curriculum::conn package_url]element-ave?curriculum_id=$curriculum_id&element_id=$element_id" $url] } -after_submit { @@ -131,12 +133,12 @@ set position [parameter::get -package_id $package_id -parameter ExternalSiteBarPosition -default bottom] set export_vars [export_vars -url {curriculum_id element_id position}] - element set_properties element url -display_value \ - "$url" + set link "$url" } else { - element set_properties element url -display_value \ - "$url" + set link "$url" } + + element set_properties element url -display_value $link } ad_return_template