item-type-new.tcl

Add an item type

Location:
/packages/calendar/www/item-type-new.tcl
Author:
Ben Adida <ben@openforce.net>
Created:
Mar 16, 2002
CVS ID:
$Id: item-type-new.tcl,v 1.5.2.1 2021/12/29 17:17:53 antoniop Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {

    Add an item type
    
    @author Ben Adida (ben@openforce.net)
    
    @creation-date Mar 16, 2002
    @cvs-id $Id: item-type-new.tcl,v 1.5.2.1 2021/12/29 17:17:53 antoniop Exp $
} {
    calendar_id:naturalnum,notnull
    type:notnull,string_length(max|100)
}

# Permission check
permission::require_permission -object_id $calendar_id -privilege calendar_admin

# Add the type
calendar::item_type_new -calendar_id $calendar_id -type $type

ad_returnredirect "calendar-item-types?calendar_id=$calendar_id"
ad_script_abort

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: