candidate-add.tcl

Location:
/packages/oct-election/www/candidate-add.tcl
CVS ID:
$Id: candidate-add.tcl,v 1.2 2014/08/07 07:32:17 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {
    @cvs-id $Id: candidate-add.tcl,v 1.2 2014/08/07 07:32:17 gustafn Exp $
} {
    election_id:naturalnum,notnull
    candidate
} 

auth::require_login
permission::require_permission -object_id [ad_conn package_id] -privilege create

db_dml candidate_add {
    insert into oct_candidate 
    (election, label)
    values (:election_id, :candidate)
}

ad_returnredirect [export_vars -base "election" {election_id}]