repository-types-edit.tcl
- Location:
- /packages/download/www/admin/repository-types-edit.tcl
- Author:
- jbank@arsdigita.com [jbank@arsdigita.com]
- Created:
- Wed Jan 10 18:34:23 2001
- CVS ID:
$Id: repository-types-edit.tcl,v 1.7 2014/08/06 16:24:42 gustafn Exp $
Related Files
- packages/download/www/admin/repository-types-edit.xql
- packages/download/www/admin/repository-types-edit.tcl
- packages/download/www/admin/repository-types-edit.adp
[ hide source ] | [ make this the default ]
File Contents
# /packages/download/www/admin/repository-types-edit.tcl ad_page_contract { @author jbank@arsdigita.com [jbank@arsdigita.com] @creation-date Wed Jan 10 18:34:23 2001 @cvs-id $Id: repository-types-edit.tcl,v 1.7 2014/08/06 16:24:42 gustafn Exp $ } { archive_type_id:naturalnum,notnull } set repository_id [download_repository_id] set user_id [ad_conn user_id] permission::require_permission -object_id $repository_id -privilege "admin" form create edit_type element create edit_type archive_type_id -label "ArchiveType ID" -datatype integer -widget hidden element create edit_type pretty_name -label "Name" -datatype text element create edit_type description -label "Description" -datatype text -widget textarea -html {rows 4 cols 40} db_1row edit_info {select archive_type_id, pretty_name, description from download_archive_types where archive_type_id = :archive_type_id} if { [form is_request edit_type] } { element set_properties edit_type archive_type_id -value $archive_type_id element set_properties edit_type pretty_name -value $pretty_name element set_properties edit_type description -value $description } if {[form is_valid edit_type]} { form get_values edit_type db_dml edit_type { update download_archive_types set pretty_name = :pretty_name, description = :description where archive_type_id = :archive_type_id } ad_returnredirect "repository-types" ad_script_abort } set title "Edit $pretty_name" set context [list [list "repository-types" "Repository Types"] $title] ad_return_template