Index: openacs-4/contrib/packages/events/www/admin/event-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/events/www/admin/event-add-2.tcl 9 Mar 2003 12:08:22 -0000 1.1 +++ openacs-4/contrib/packages/events/www/admin/event-add-2.tcl 9 Mar 2003 16:27:55 -0000 1.2 @@ -1,7 +1,7 @@ # events/www/admin/event-add-2.tcl ad_page_contract { - Purpose: allow an admin to insert info for a new event, one a + Purpose: allow an admin to insert info for a new event, once a venue has been chosen. @param activity_id the activity type of the new event @@ -207,11 +207,17 @@ events::venue::get -venue_id $venue_id -array venue_info set activity_name $activity_info(name) -element set_properties event_add start_time -value [template::util::date::today] -element set_properties event_add end_time -value [template::util::date::today] -element set_properties event_add reg_deadline -value [template::util::date::today] -element set_properties event_add display_after -value "Thanks for registering for $activity_name!" -element set_properties event_add venue_name -value $venue_info(venue_name) -element set_properties event_add max_people -value $venue_info(max_people) +if { [form is_request event_add] } { + element set_properties event_add start_time -value [template::util::date::today] + element set_properties event_add end_time -value [template::util::date::today] + element set_properties event_add reg_deadline -value [template::util::date::today] + element set_properties event_add display_after -value "Thanks for registering for $activity_name!" + element set_properties event_add max_people -value $venue_info(max_people) +} + +if { ![form is_valid event_add] } { + element set_properties event_add venue_name -value $venue_info(venue_name) +} + set title "Add a New Event for $activity_name" -set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Add Event"] \ No newline at end of file +set context [list [list "activities" Activities] [list "activity?[export_vars { activity_id }]" $activity_info(name)] "Add Event"]