Index: openacs-4/packages/simulation/www/simbuild/template-load.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/template-load.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/www/simbuild/template-load.tcl 7 Jan 2004 13:12:17 -0000 1.3 +++ openacs-4/packages/simulation/www/simbuild/template-load.tcl 30 Nov 2004 21:09:16 -0000 1.4 @@ -1,24 +1,33 @@ ad_page_contract { Load a simulation from a spec +} { + cancel_url:optional } +if { ![exists_and_not_null cancel_url] } { + set cancel_url [get_referrer] +} + permission::require_permission -object_id [ad_conn package_id] -privilege sim_template_create set page_title "Load Template" set context [list [list "." "SimBuild"] $page_title] -ad_form -name load -edit_buttons [list [list "Load" ok]] -form { - {pretty_name:text - {label "Name"} - {html {size 50}} - } - {spec:text(textarea),nospell - {label "Spec"} - {help_text {Copy and paste the specification here. A specification is a plain-text file which can be generated when editing a template.}} - {html {cols 80 rows 10}} - } +ad_form -name load \ + -cancel_url $cancel_url \ + -edit_buttons [list [list "Load" ok]] -form { + {pretty_name:text + {label "Name"} + {html {size 50}} + } + {spec:text(textarea),nospell + {label "Spec"} + {help_text {Copy and paste the specification here. A specification is a plain-text file which can be generated when editing a template.}} + {html {cols 80 rows 10}} + } + {cancel_url:text(hidden) } } -on_request { } -on_submit {