| |
54 |
54 |
} |
| |
55 |
55 |
|
| |
56 |
56 |
template::element create edit_attribute attribute_value \ |
| |
57 |
57 |
-value $current_value \ |
| |
58 |
58 |
-datatype "text" \ |
| |
59 |
59 |
-widget select \ |
| |
60 |
60 |
-optional \ |
| |
61 |
61 |
-options $option_list \ |
| |
62 |
62 |
-label "$attribute_pretty_name" |
| |
63 |
63 |
} else { |
| |
64 |
64 |
set focus "edit_attribute.attribute_value" |
| |
65 |
65 |
template::element create edit_attribute attribute_value \ |
| |
66 |
66 |
-value $current_value \ |
| |
67 |
67 |
-datatype "text" \ |
| |
68 |
68 |
-optional \ |
| |
69 |
69 |
-label "$attribute_pretty_name" |
| |
70 |
70 |
} |
| |
71 |
71 |
|
| |
72 |
72 |
if { [template::form is_valid edit_attribute] } { |
| |
73 |
73 |
|
| |
74 |
|
set attribute_value [ns_set get [ns_getform] "attribute_value"] |
| |
75 |
|
|
| |
76 |
74 |
db_dml attribute_update \ |
| |
77 |
75 |
"update $type_table |
| |
78 |
76 |
set $attribute_column = :attribute_value |
| |
79 |
77 |
where $type_column = :id_column" |
| |
80 |
78 |
|
| |
81 |
79 |
ad_returnredirect $return_url |
| |
82 |
80 |
ad_script_abort |
| |
83 |
81 |
} |
| |
84 |
82 |
|
| |
85 |
83 |
# Local variables: |
| |
86 |
84 |
# mode: tcl |
| |
87 |
85 |
# tcl-indent-level: 4 |
| |
88 |
86 |
# indent-tabs-mode: nil |
| |
89 |
87 |
# End: |