constraints-create-2.tcl

Optionally directs the user to create a relational segment (based on the value of operation)

Location:
/packages/acs-subsite/www/admin/groups/constraints-create-2.tcl
Author:
mbryzek@arsdigita.com
Created:
Thu Jan 4 11:02:15 2001
CVS ID:
$Id: constraints-create-2.tcl,v 1.6.2.1 2019/05/16 09:54:29 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {

    Optionally directs the user to create a relational segment (based
    on the value of operation)

    @author mbryzek@arsdigita.com
    @creation-date Thu Jan  4 11:02:15 2001
    @cvs-id $Id: constraints-create-2.tcl,v 1.6.2.1 2019/05/16 09:54:29 gustafn Exp $

} {
    group_id:notnull,naturalnum
    rel_type:notnull
    { operation "" }
    { return_url:localurl "" }
}

set operation [string trim [string tolower $operation]]

if {$operation eq "yes"} {
    if { $return_url eq "" } {
        # Setup return_url to send up back to the group admin page
        # when we're all done
        set return_url [export_vars -base [ad_conn package_url]/admin/groups/one group_id]
    }
    ad_returnredirect [export_vars -base ../rel-segments/new {group_id rel_type return_url}]
    ad_script_abort

} else {
    if { $return_url eq "" } {
        set return_url [export_vars -base one group_id]
    }
    ad_returnredirect $return_url
    ad_script_abort
}


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