jeffd
committed
on 18 Sep 02
ns_return->ad_return, ad_script_abort, redirect to absract urls
openacs-4/.../www/admin/task-add-2.tcl (+1 -1)
21 21
22 22         if { $num_rows > 0 } {
23 23             ad_complain "There is already a task with this name"
24 24         }
25 25     }
26 26
27 27     trigger_type_legal -requires { trigger_type } {
28 28         set trigger_type [string tolower $trigger_type]
29 29         if { [lsearch -exact { user automatic message time } $trigger_type] == -1 } {
30 30             ad_complain "Trigger type must be one of user, automatic, message or time."
31 31         }
32 32     }
33 33 }
34 34
35 35 if { [info exists cancel] && ![empty_string_p $cancel] } {
36 36     # User hit cancel
37 37     if { [empty_string_p $return_url] } {
38 38         set return_url "define?[export_vars -url {workflow_key}]"
39 39     }
40 40     ad_returnredirect $return_url
41       return
  41     ad_script_abort
42 42 }
43 43
44 44 set create_new_role_p 0
45 45 if { [string equal $role_key "<new>"] } {
46 46     set role_key ""
47 47     set create_new_role_p 1
48 48 }
49 49
50 50 set transition_key [wf_add_transition \
51 51         -workflow_key $workflow_key \
52 52         -transition_name $transition_name \
53 53         -role_key $role_key \
54 54         -trigger_type $trigger_type \
55 55         -estimated_minutes $estimated_minutes \
56 56         -instructions $instructions]
57 57
58 58 if { [empty_string_p $return_url] } {
59 59     set return_url "define?[export_vars -url {workflow_key transition_key}]"
60 60 }
61 61