Index: openacs-4/packages/ams/www/attribute-option-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/attribute-option-delete.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ams/www/attribute-option-delete.tcl 18 May 2005 17:11:48 -0000 1.2 +++ openacs-4/packages/ams/www/attribute-option-delete.tcl 28 May 2005 15:37:27 -0000 1.3 @@ -1,25 +1,25 @@ -ad_page_contract { - - Update sort order - - @author Matthew Geddert openacs@geddert.com - @creation-date 2004-07-28 - @cvs-id $Id$ - - -} { - option_id:integer,notnull -} -validate { - option_has_no_entries -requires {option_id} { - if { ![string match [db_string get_count { select count(*) from ams_option_map where option_id = :option_id } -default {0}] {0}] } { - ad_complain {You cannot delete an option that already has entries on it} - } - } -} - -db_1row get_option_info { select * from ams_options where option_id = :option_id } - -db_dml delete_option { delete from ams_options where option_id = :option_id } - - -ad_returnredirect -message "Option Deleted" "attribute?[export_vars -url {ams_attribute_id}]" +ad_page_contract { + + Update sort order + + @author Matthew Geddert openacs@geddert.com + @creation-date 2004-07-28 + @cvs-id $Id$ + + +} { + option_id:integer,notnull +} -validate { + option_has_no_entries -requires {option_id} { + if { ![string match [db_string get_count { select count(*) from ams_option_map where option_id = :option_id } -default {0}] {0}] } { + ad_complain {[_ ams.lt_You_cannot_delete_an_]} + } + } +} + +db_1row get_option_info { select * from ams_options where option_id = :option_id } + +db_dml delete_option { delete from ams_options where option_id = :option_id } + + +ad_returnredirect -message "[_ ams.Option_Deleted]" "attribute?[export_vars -url {ams_attribute_id}]"