Index: openacs-4/packages/dotlrn-ecommerce/lib/section.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/section.tcl,v diff -u -N -r1.33 -r1.34 --- openacs-4/packages/dotlrn-ecommerce/lib/section.tcl 10 Mar 2006 19:28:53 -0000 1.33 +++ openacs-4/packages/dotlrn-ecommerce/lib/section.tcl 13 Mar 2006 17:39:16 -0000 1.34 @@ -42,6 +42,7 @@ set package_id [ad_conn package_id] set validate [list] +set show_price_option_p [dotlrn_ecommerce::util::param::get -default 1 ShowPriceOptionP] catch { db_1row template_community { @@ -114,19 +115,22 @@ {price:currency,to_sql(sql_number) {label "Regular Price"} {html {size 6}} {help_text {Enter any fees related to this course here. \$0 in this field means there is no related fee.}} } - {show_price_p:text(radio) {label "Show Price Information"} {options {{Yes t} {No f}}}} } } else { ad_form -extend -name add_section -form { {section_name:text {label "Section Code"} {help_text {E.g. Section 01, W06}}} {price:currency,to_sql(sql_number) {label "Regular Price"} {html {size 6}} {help_text "Enter any fees related to this course here."} } + } +} + +if { $show_price_option_p } { + ad_form -extend -name add_section -form { {show_price_p:text(radio) {label "Show Price Information"} {options {{Yes t} {No f}}}} } } - # HAM : Let's check if we have MemberPriceP enabled and set # if it is, let's add Member Price text if { [parameter::get -package_id [ad_conn package_id] -parameter MemberPriceP -default 0 ] && @@ -407,7 +411,9 @@ } set show_participants_p t set show_sessions_p t - set show_price_p t + if { $show_price_option_p } { + set show_price_p t + } } -new_request { set product_id 0 set price [template::util::currency::create "$" "0" "." "00" ] @@ -470,6 +476,11 @@ where section_id = :section_id }] } -new_data { + + if { ! $show_price_option_p } { + set show_price_p t + } + db_transaction { # create the class instance # See if we have a template community @@ -668,6 +679,10 @@ } } + if { ! $show_price_option_p } { + set show_price_p t + } + db_transaction { db_dml update_section { update dotlrn_ecommerce_section set