Index: openacs-4/packages/simulation/www/simbuild/template-clone.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/template-clone.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/simbuild/template-clone.tcl 11 Dec 2003 15:50:51 -0000 1.5 +++ openacs-4/packages/simulation/www/simbuild/template-clone.tcl 9 Jan 2004 09:37:50 -0000 1.6 @@ -22,6 +22,15 @@ } -on_request { } -on_submit { + set unique_p [simulation::template::pretty_name_unique_p \ + -package_id [ad_conn package_id] \ + -pretty_name $pretty_name] + + if { !$unique_p } { + form set_error clone pretty_name "This name is already used by another simulation" + break + } + set new_workflow_array(pretty_name) $pretty_name set new_workflow_array(short_name) {} set new_workflow_array(sim_type) {dev_template}