| |
51 |
51 |
{value $edit_mode_p} |
| |
52 |
52 |
} |
| |
53 |
53 |
|
| |
54 |
54 |
{type:text(select) |
| |
55 |
55 |
{label "Type"} |
| |
56 |
56 |
{options {$type_options}} |
| |
57 |
57 |
{value $type_value} |
| |
58 |
58 |
} |
| |
59 |
59 |
|
| |
60 |
60 |
{proc:text |
| |
61 |
61 |
{label $type_label} |
| |
62 |
62 |
{html {size 40 maxlength 300}} |
| |
63 |
63 |
{value $proc_value} |
| |
64 |
64 |
} |
| |
65 |
65 |
|
| |
66 |
66 |
} -validate { |
| |
67 |
67 |
{proc |
| |
68 |
68 |
{ ![empty_string_p [info procs ::${proc}]] } |
| |
69 |
69 |
{The specified procedure name does not exist. Is the -procs.tcl file loaded?} |
| |
70 |
70 |
} |
| |
|
71 |
{proc |
| |
|
72 |
{ [apm_callback_has_valid_args -type $type -proc_name $proc] } |
| |
|
73 |
{The callback proc $proc must be defined with ad_proc [ad_decode [apm_arg_names_for_callback_type -type $type] "" "and should take no arguments" "and have the following required switches: [apm_arg_names_for_callback_type -type $type]"]} |
| |
|
74 |
} |
| |
71 |
75 |
} -on_submit { |
| |
72 |
76 |
|
| |
73 |
77 |
apm_set_callback_proc -type $type -version_id $version_id $proc |
| |
74 |
78 |
|
| |
75 |
79 |
ad_returnredirect $return_url |
| |
76 |
80 |
ad_script_abort |
| |
77 |
81 |
} |
| |
78 |
82 |
|
| |
79 |
83 |
if { $edit_mode_p } { |
| |
80 |
84 |
element set_properties callback type -mode display |
| |
81 |
85 |
} |
| |
82 |
86 |
|
| |
83 |
87 |
ad_return_template |