Index: openacs-4/packages/scholarship-fund/www/fund-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/fund-add-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/scholarship-fund/www/fund-add-edit.tcl 3 Aug 2005 22:58:58 -0000 1.3 +++ openacs-4/packages/scholarship-fund/www/fund-add-edit.tcl 5 Aug 2005 03:35:11 -0000 1.4 @@ -40,7 +40,6 @@ {title:text {label Title}} {description:text(textarea) {label Description}} {account_code:text {label "Account Code"}} - {amount:float {label "Amount in Fund"}} } -edit_request { # get existing fund info db_1row get_fund "select sf.title, sf.description, sf.account_code, sf.amount from scholarship_fundi sf, cr_items ci where sf.revision_id=ci.live_revision and sf.item_id=:item_id" @@ -54,17 +53,15 @@ -description $description \ -content_type scholarship_fund \ -is_live t \ - -attributes [list [list account_code $account_code] \ - [list amount $amount]] + -attributes [list [list account_code $account_code]] } -edit_data { #update fund content::revision::new \ -item_id $item_id \ -title $title \ -description $description \ - -attributes [list [list account_code $account_code] \ - [list amount $amount]] \ + -attributes [list [list account_code $account_code]] \ -is_live t } -after_submit { Index: openacs-4/packages/scholarship-fund/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/scholarship-fund/www/index.tcl 3 Aug 2005 22:58:58 -0000 1.3 +++ openacs-4/packages/scholarship-fund/www/index.tcl 5 Aug 2005 03:35:11 -0000 1.4 @@ -44,7 +44,6 @@ -elements { title { label "Title" link_url_col one_url } description { label "Description" } - amount { label "Amount in Fund" } actions { label "Actions" display_template { Index: openacs-4/packages/scholarship-fund/www/one-fund.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/one-fund.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/scholarship-fund/www/one-fund.tcl 3 Aug 2005 22:58:58 -0000 1.3 +++ openacs-4/packages/scholarship-fund/www/one-fund.tcl 5 Aug 2005 03:35:11 -0000 1.4 @@ -36,7 +36,6 @@ {title:text {label "Fund Title"}} {description:text(textarea) {label "Description"}} {account_code:text {label "Account Code"}} - {amount:text {label "Amount"}} } -on_request { db_1row get_fund "select sf.title, sf.description, sf.account_code, sf.amount from scholarship_fundi sf, cr_items ci where sf.revision_id=ci.live_revision and sf.item_id=:item_id" } Index: openacs-4/packages/scholarship-fund/www/scholarship-grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/scholarship-grant.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/scholarship-fund/www/scholarship-grant.tcl 3 Aug 2005 22:58:58 -0000 1.1 +++ openacs-4/packages/scholarship-fund/www/scholarship-grant.tcl 5 Aug 2005 03:35:11 -0000 1.2 @@ -129,16 +129,10 @@ } -set fund_amount [db_string fund_amount { - select amount - from scholarship_fund - where fund_id = :fund_id -} -default 0] - ad_form -extend -name grant -validate { {grant_amount - { $grant_amount > 0 && $grant_amount <= $fund_amount } - "Please enter an amount up to $fund_amount" + { $grant_amount > 0 } + "Invalid grant amount" } } -form { {grant_amount:text {label "Amount to Grant"} @@ -169,11 +163,11 @@ (:fund_id, :user_id, :gift_certificate_id, :grant_amount) } - db_dml update_scholarship_fund { - update scholarship_fund - set amount = amount - :grant_amount - where fund_id = :fund_id - } +# db_dml update_scholarship_fund { +# update scholarship_fund +# set amount = amount - :grant_amount +# where fund_id = :fund_id +# } } ad_returnredirect index