| |
1 |
1 |
# packages/lorsm/www/md/annotationmd/annotation_add.tcl |
| |
2 |
2 |
|
| |
3 |
3 |
ad_page_contract { |
| |
4 |
4 |
|
| |
5 |
5 |
Add/Edit Annotation MD Entry |
| |
6 |
6 |
|
| |
7 |
7 |
@author Gerard Low (glow5809@mail.usyd.edu.au) |
| |
8 |
8 |
@author Ernie Ghiglione (ErnieG@mm.st) |
| |
9 |
9 |
@creation-date 16 October 2004 |
| |
10 |
10 |
@cvs-id $Id$ |
| |
11 |
11 |
|
| |
12 |
12 |
} { |
| |
13 |
13 |
ims_md_id:integer |
| |
14 |
14 |
} -properties { |
| |
15 |
15 |
} -validate { |
| |
16 |
16 |
} -errors { |
| |
17 |
17 |
} |
| |
18 |
18 |
|
| |
19 |
19 |
# set context & title |
| |
20 |
20 |
set context [list \ |
| |
21 |
|
[list [export_vars -base ".." ims_md_id] |
| |
22 |
|
"[_ lorsm.IMS_Metadata_Editor]"] \ |
| |
|
21 |
[list [export_vars -base "../" ims_md_id] \ |
| |
|
22 |
[_ lorsm.IMS_Metadata_Editor]] \ |
| |
23 |
23 |
[list [export_vars -base "../annotationmd" ims_md_id] \ |
| |
24 |
|
"[_ lorsm.Annotation_MD]"] \ |
| |
25 |
|
"[_ lorsm.Annotation_Entry]"] |
| |
|
24 |
[_ lorsm.Annotation_MD]] \ |
| |
|
25 |
[_ lorsm.Annotation_Entry]] |
| |
26 |
26 |
|
| |
27 |
27 |
set title "[_ lorsm.lt_Add_Annotation_MD_Ent]" |
| |
28 |
28 |
|
| |
29 |
29 |
# Form |
| |
30 |
30 |
ad_form \ |
| |
31 |
31 |
-name annotationmd_add \ |
| |
32 |
32 |
-cancel_url ../annotationmd?ims_md_id=$ims_md_id \ |
| |
33 |
33 |
-mode edit \ |
| |
34 |
34 |
-form { |
| |
35 |
35 |
ims_md_an_id:key(ims_md_annotation_seq) { |
| |
36 |
36 |
ims_md_id:text(hidden) { value $ims_md_id } |
| |
37 |
37 |
} |
| |
38 |
38 |
|
| |
39 |
39 |
} -new_data { |
| |
40 |
40 |
db_dml do_insert {} |
| |
41 |
41 |
|
| |
42 |
42 |
} -after_submit { |
| |
43 |
43 |
ad_returnredirect [export_vars -base "../annotationmd" {ims_md_id}] |
| |
44 |
44 |
ad_script_abort |
| |
45 |
45 |
} |