Index: openacs-4/packages/notifications/www/request-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-new.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/notifications/www/request-new.tcl 8 Nov 2002 10:04:23 -0000 1.6 +++ openacs-4/packages/notifications/www/request-new.tcl 16 Jan 2003 13:53:40 -0000 1.7 @@ -17,7 +17,6 @@ # Check that the object can be subcribed to notification::security::require_notify_object -object_id $object_id - if {[empty_string_p $pretty_name]} { set page_title "[_ notifications.Request_Notification]" } else { @@ -26,27 +25,16 @@ set context [list "[_ notifications.Request_Notification]"] +set intervals [notification::get_intervals -type_id $type_id] +set delivery_methods [notification::get_delivery_methods -type_id $type_id] -form create subscribe +ad_form -name subscribe -export {type_id object_id return_url} -form { + {interval_id:integer(select) {label "[_ notifications.lt_Notification_Interval]"} + {options $intervals}} + {delivery_method_id:integer(select) {label "[_ notifications.Delivery_Method]"} + {options $delivery_methods}} +} -on_submit { -element create subscribe type_id \ - -label "[_ notifications.Type_ID]" -datatype integer -widget hidden - -element create subscribe object_id \ - -label "[_ notifications.Object_ID]" -datatype integer -widget hidden - -element create subscribe return_url \ - -label "[_ notifications.Return_URL]" -datatype text -widget hidden - -element create subscribe interval_id \ - -label "[_ notifications.lt_Notification_Interval]" -datatype integer -widget select -options [notification::get_intervals -type_id $type_id] - -element create subscribe delivery_method_id \ - -label "[_ notifications.Delivery_Method]" -datatype integer -widget select -options [notification::get_delivery_methods -type_id $type_id] - -if {[form is_valid subscribe]} { - template::form get_values subscribe type_id object_id return_url interval_id delivery_method_id - # Add the subscribe notification::request::new \ -type_id $type_id \ @@ -58,7 +46,5 @@ ad_returnredirect $return_url ad_script_abort } - -element set_properties subscribe type_id -value $type_id -element set_properties subscribe object_id -value $object_id -element set_properties subscribe return_url -value $return_url + +ad_return_template